curl: (6) Could not resolve host: google.com; Name or service not known

Issues were: IPV6 enabled Wrong DNS server Here is how I fixed it: IPV6 Disabling Open Terminal Type su and enter to log in as the super user Enter the root password Type cd /etc/modprobe.d/ to change directory to /etc/modprobe.d/ Type vi disableipv6.conf to create a new file there Press Esc + i to insert data to file Type install ipv6 /bin/true on the file to … Read more

linux command to get size of files and directories present in a particular folder?

Use ls command for files and du command for directories. Checking File Sizes ls command will not list the actual size of directories(why?). Therefore, we use du for this purpose. Checking Directory sizes Including -h option in any of the above commands (for Ex: ls -lh * or du -sh) will give you size in human readable format (kb, mb,gb, …) For more information see man ls and man du

Looping through the content of a file in Bash

One way to do it is: As pointed out in the comments, this has the side effects of trimming leading whitespace, interpreting backslash sequences, and skipping the last line if it’s missing a terminating linefeed. If these are concerns, you can do: Exceptionally, if the loop body may read from standard input, you can open the … Read more

What does it mean to mount a file system in linux?

A better way to describe “mount” is “attach”. The filesystem being mounted is attached to an empty directory of the existing filesystem. That is, the top level directory of the mounted filesystem becomes the directory on the existing filesystem. Subdirectories of the mounted filesystem become the subdirectories of the former directory on the existing filesystem, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)