If Conditons for a | FILE related
In shell scripting, various file-related conditions can be used to check the properties of files. Here are some common file-related conditions in Bash scripting: Existence Checks : -e file : True if file exists. -f file : True if file exists and is a regular file. -d file : True if file exists and is a directory. -s file : True if file exists and has a size greater than zero. Permission Checks : -r file : True if file exists and is readable. -w file : True if file exists and is writable. -x file : True if file exists and is executable. Ownership Checks : -O file : True if file exists and is owned by the current user. -G file : True if file exists and is owned by the current group. Modification Time Checks : -nt file : True if the current file is newer than file . -ot file : True if the current file is older than file . Type Checks : -h file : True if file exists and is a symbolic link. -L file : Same as -h . -p file : True if file exists and is a named pipe (FIFO). -S ...