Thursday, January 11, 2007

Find command syntax
find [path...] [expression]
The expression is made up of options, tests and actions

find Options
-daystart, -depth, -maxdepth levels, -mindepth levels
-mount, -noleaf, -xdev

find tests
+n for greater than n,-n for less than n, n for exactly n.

-path pattern
find . -path './myproject' -print
-regex pattern
File name matches regular expression pattern. This is a match on the whole path, not a search.
-size n[bckw]
File uses n units of space. File uses n units of space. The units are 512-byte blocks by default or if `b' follows n, bytes if `c' follows n, kilobytes if `k' follows n, or 2-byte words if `w' follows n.
-type c
File is of type c:
b block (buffered) special
c character (unbuffered) special
d directory
p named pipe (FIFO)
f regular file
l symbolic link
s socket
Find Actions
-exec command
-fprint file
-print, -printf format
-prune
If -depth is not given, true; do not descend the current directory.
If -depth is given, false; no effect.
-ls

0 Comments:

Post a Comment

<< Home