Filesystem Relate Tests Flashcards

1
Q

[ -e $VAR ]

A

True if variable holds an existing file (file or directory)

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

[ -f $VAR ]

A

True is variable holds an existing regular file

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

[ -d $VAR ]

A

True is variable holds an existing directory

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

[ -x $VAR ]

A

True if variable is an executable file

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

[ -L $VAR ]

A

True variable holds path of a symlink

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

[ -r $VAR ]

A

True if variable holds file that is readable

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

[ -w $VAR ]

A

True if variable holds file that is writable

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