Linux / UNIX: Find Out If a Directory Exists or Not

last updated in Categories CentOS, Debian Linux, File system, Gentoo Linux, Howto, Linux, Open source coding, programming, RedHat/Fedora Linux, Shell scripting, Suse Linux, Sys admin, Ubuntu Linux, UNIX

I’ve already written a small tutorial about finding out if a file exists or not under Linux / UNIX bash shell. However, couple of our regular readers like to know more about a directory checking using if and test shell command.

Linux / UNIX: Find Out If File Exists With Conditional Expressions in a Bash Shell

last updated in Categories Howto, Linux, RedHat/Fedora Linux, Shell scripting, UNIX

With the help of BASH shell and IF command, it is possible to find out if a file exists or not on the filesystem. A conditional expression (also know as “evaluating expressions”) can be used by [[ compound command and the test ([) builtin commands to test file attributes and perform string and arithmetic comparisons.