Checks if a file exists.
-f
Checks if a directory exists
-d
Checks if a file or directory exists
-e
Checks if a file is readable
-r
Checks if a file is writable
-w
Checks if a file is executable.
-x
Checks if a file is not empty (size greater than zero)
-s
Checks if a string is empty
-z
Logical NOT
!
Logical AND
-a
Logical OR
-o
Command to change file permissions.
Chmod
Command to change file ownership
chown
Copy files and directories
cp
Move or rename files and directories
mv
Remove files and directories
rm
Create an empty file or update the access and modification timestamps of a file
touch
Create directories
mkdir
Remove empty directories
rmdir