File Expressions Flashcards

1
Q

file1 -ef file2

A

file1 and file2 have the same inode numbers

(the two filenames refer to the same file by hard linking)

Effectively the same File

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

file1 -nt file2

A

file1 is newer than file2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

file1 -ot file2

A

file1 is older than file2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

-b file

A

file exist and is a
Special-Block
(device) file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

-c

A

file exist and is a
Special-Character
(device) file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

-d file

A

file exist and is a directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

-e file

A

file exist

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

-f file

A

file exist and a regular file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

-g file

A

file exist and is a set-group-id

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

-G file

A

file exist and is owned by the effective group ID

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

-k file

A

file exist and has it’s
“Sticky Bit”
set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

-L file

A

file exists and is a symbolic link

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

-o file

A

file exists and is
Owned
by the effective user ID

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

-p file

A

file exists and is a named pipe

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

-r file

A

file exists and is readable (has read permissions for effective user)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

-s file

A

file exist and has a
SIZE
greater than 0

17
Q

-S file

A

file exists and is a
network Socket

18
Q

-t fd

A

fd is a
File Descriptor
directed to/from the
Terminal.

Used to determine whether standard input/output/error is being redirected

19
Q

-u file

A

file exists and is a
setuid
(Set U ID)

20
Q

-w file

A

file exists and is writable (has write permissions for the effective user)

21
Q

-x file

A

file exists and is executable