blob: 9ac035caf473e119894157e0c408689b09c92517 (
plain) (
blame)
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
52
53
54
55
56
57
58
59
60
61
|
NAME
xtest - test file types and permissions of multiple files
SYNOPSIS
xtest [-0bcdefghkLprSstuwx] [+bcdefghkLprSstuwx] [file ...]
DESCRIPTION
xtest tests the file types and permissions of each specified
file; if no file has been specified, a list file is read
from stdin.
Each file that passes at least one of the tests is printed to
stdout.
OPTIONS
-0 Use NUL byte instead of <newline> to delimit files in
both the input and the output.
-e File exists.
-f | -d | -p | -hL | -S | -s | -b | -c
File exists and is a (regular file [-f] | directory
[-d] | named pipe [-p] | symbolic link [-h | -L] |
socket [-S] | non-empty file [-s] | block special [-b] |
character special [-c]).
-k | -g | -u | -r | -w | -x
File exists and has (sticky(1) [-k] | setgid(2) [-g] |
setuid(4) [-u] | read(4) [-r] | write(2) [-w] |
execute(1) [-x]) permissions.
-t Input is a file descriptor and is associated with a
terminal.
+e File does not exist.
+f | +d | +p | +hL | +S | +s | +b | +c
File does not exist or is not a (regular file [+f] |
directory [+d] | named pipe [+p] | symbolic link [+h |
+L] | socket [+S] | non-empty file [+s] | block special
[+b] | character special [+c]).
+k | +g | +u | +r | +w | +x
File does not exist or does not have (sticky(1) [+k] |
setgid(2) [+g] | setuid(4) [+u] | read(4) [+r] |
write(2) [+w] | execute(1) [+x]) permissions.
+t Input is not a file descriptor or is not associated
with a terminal.
RATIONALE
+-flags are included because it is too cumbersome to use
comm(1).
Only one test needs to pass because this allows the user to
represent the required condition in conjunctive normal form
by piping together multiple instances of xtest for conjunction.
Disjunctive normal form is not as simple.
SEE ALSO
test(1), find(1), xargs(1)
|