% find. -mtime -1
./afile
./cfile
% find.ls -mtime -1
43073 0 -r-------- 1 jerry ora 0 Mar 27 18:16 ./afile
43139 2 -r--r--r-- 1 jerry ora 1025 Mar 24 02:33 ./cfile
The find. alias is handy inside backquotes,
feeding a pipe, and other places you need a list of filenames. The
second one, find.ls, uses
-ls instead of -print:
alias find. 'find . \( -type d ! -name . -prune \) -o \( \!* -print \)'
alias find.ls 'find . \( -type d ! -name . -prune \) -o \( \!* -ls \)'
If you don't want the ./ at the
start of each name, add a pipe through cut -c3-
or cut -d'/' -f2- to the end of the alias
definition.
-- JP
| | |
9.25. Finding Files with -prune | | 9.27. Skipping Parts of a Tree in find |