summaryrefslogtreecommitdiff
path: root/extract-data-from-abs-guide/files/file.txt
blob: 591ae4fc1870ac3eb1a2a81609b8ccd75337dd2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# TEMPLATE: if [ {} "$f" ]
   -h
          file is a symbolic link

   -L
          file is a symbolic link

   -S
          file is a socket

   -t
          file (descriptor) is associated with a terminal device

   -r
          file has read permission (for the user running the test)

   -w
          file has write permission (for the user running the test)

   -x
          file has execute permission (for the user running the test)

   -g
          set-group-id (sgid) flag set on file or directory

   -u
          set-user-id (suid) flag set on file

   -k
          sticky bit set

   -O
          you are owner of file

   -G
          group-id of file same as yours

   -N
          file modified since it was last read

   f1 -nt f2
          file f1 is newer than f2

   f1 -ot f2
          file f1 is older than f2

   f1 -ef f2
          files f1 and f2 are hard links to the same file

   !
          "not" -- reverses the sense of the tests above (returns true if condition absent).