File Expressions Flashcards
file1 -ef file2
file1 and file2 have the same inode numbers
(the two filenames refer to the same file by hard linking)
Effectively the same File
file1 -nt file2
file1 is newer than file2
file1 -ot file2
file1 is older than file2
-b file
file exist and is a
Special-Block
(device) file
-c
file exist and is a
Special-Character
(device) file
-d file
file exist and is a directory
-e file
file exist
-f file
file exist and a regular file
-g file
file exist and is a set-group-id
-G file
file exist and is owned by the effective group ID
-k file
file exist and has it’s
“Sticky Bit”
set
-L file
file exists and is a symbolic link
-o file
file exists and is
Owned
by the effective user ID
-p file
file exists and is a named pipe
-r file
file exists and is readable (has read permissions for effective user)