next up previous contents
Next: awk and sed Up: Useful commands Previous: grep


Search for files in a directory hierarchy.


cd ~find

Real-life example:

Some quality applications/programs do not clean the temporary files created after use. One of the admin task is to remove them. Here we remove files in /tmp which have not been modified for more than 7 days.

find /tmp -depth -mtime +7 -exec /bin/rm -rf {} tex2html_wrap_inline432 ;

There are many options available for find. Its a very powerful tool in system administration. For detail, see its manpage.

System Administrator
Thu Jul 26 11:24:05 HKT 2001