This is good to test a file has enough permission to do read, write or execute operations. For a good…
Browsing: Bash Shell
In Linux, an empty file is a file that has a size of zero bytes. This means that the file…
Bash scripts are simple text files that contain a collection of commands. Bash scripts can help with administrative tasks, task…
Bash is a popular shell used on Linux and macOS systems. It is a powerful tool for automating repetitive tasks…
We can use an internal field separator (IFS) variable to parse an array. Let’s use an example script, where first…
Command SNAME=$(basename “$(test -L “$0” && readlink “$0” || echo “$0″)”) While running a bash script using Linux terminal the…
Command: md5sum myfile.php > myfile.php.md5 Above command will generate md5 checksum of file myfile.php and store in file myfile.php.md5. myfile.php.md5…
Command: echo <password> | passwd –stdin <username> Example: Use the following command to change password of user jack in a…
Command: while true;do echo “Press CTRL+C to Exit”; done Example 1: Some times we are required to execute some commands…
Symbolic links, also known as symlinks, are special files that allow you to create a shortcut to another file or…