Find Expression |
Ftwalk Expression |
Description/Notes |
-name pattern |
name( pattern ) |
Match filename using shell patterns. Ftwalk can also specify
same as: name == string; name ~ pattern
(shell pattern string or regular expression). |
-perm [-]num |
perm([-]num) |
Test file permission bits. If negative, only test specified bits.
Ftwalk can also specify same as: perm == num;
(perm & num) == num. |
-size [±]n |
sizeb op n |
Compare file size in 512-byte blocks. Find uses +
for >, - for <, neither for ==.
Ftwalk uses any relational operator: <, <=,
==, !=, >, >=. |
-size [±]nc |
size op n |
Compare file size in bytes. |
-atime [±]n |
atime op n |
Compare file access time in days ago. |
-ctime [±]n |
ctime op n |
Compare file creation time in days ago. |
-mtime [±]n |
mtime op n |
Compare file modify time in days ago. |
-newer path |
newer( path ) |
True if file modify time is more recent than reference file. |
-anewer path |
anewer( path ) |
True if file access time is more recent than reference file. |
-cnewer path |
cnewer( path ) |
True if file creation time is more recent than reference file. |
-type b |
isblk |
True if file is block special. |
-type c |
ischr |
True if file is character special. |
-type d |
isdir |
True if file is directory. |
-type f |
isreg |
True if file is regular file. |
-type l |
islnk |
True if file is symbolic link. |
-type p |
isfifo |
True if file is named pipe (FIFO). |
-inum n |
inum == n |
True if file has inode number. |
-links [±]n |
links op n |
Compare number of links to file.
|
-user uid |
user == uid |
True if file belongs to user. |
-group gid |
group == gid |
True if file belongs to group. |
-nouser |
nouser |
True if file owner is not in /etc/passwd. |
-nogroup |
nogroup |
True if file group is not in /etc/group. |
-fstype type |
fstype == type |
True if file system type matches. |
Expressions which in Ftwalk would normally occur
in action blocks. |
-print |
print |
Print file pathname to stdout. Ftwalk default if no
action block. |
-exec cmd ... \; |
sh( cmd ) |
Execute shell command. Use {} to substitute current pathname. |
-ok cmd ... \; |
oksh( cmd ) |
Like -exec and sh, except prompts user before executing
command. |
-prune |
prune |
Restricts file search to exclude directories below the current file. |
Options which control file search methodology. Also available
in Ftwalk as command line option switches. |
-depth |
depth |
Enables depth-first file tree search.
|
-mount |
mount |
Restricts search to initial file system directories. |
-local |
local |
Restricts search to file systems on local machine. |
-follow |
follow |
Causes file search to follow symbolic links. |
GNU find has a number of additional features, which need to be
reviewed and charted. Most of these appear to have equivalent
support in ftwalk, although the translation may be less
straight forward.