real world FIND usage
Jul 15, 2009, 19:32 (0 Talkback[s])
find . -type f -size +10000 -exec ls -al {} ;
find . -atime +1 -type f -exec mv {} TMP ; # mv files older then 1 day to dir TMP
find . -name "-F" -exec rm {} ; # a script error created a file called -F
find . -exec grep -i "vds admin" {} ;
find . ! -name "*.Z" -exec compress -f {} ;
find . -type f ! -name "*.Z" ! -name ".comment" -print | tee -a /tmp/list
find . -name *.ini
find . -exec chmod 775 {} ;
find . -user xuser1 -exec chown -R user2 {} ;
find . -name ebtcom*
find . -name mkbook
find . -exec grep PW0 {} ;
find . -exec grep -i "pw0" {} ;
Complete
Story
Related Stories:
- 5 Bash Tips, Part II(Jul 07, 2009)
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
(Jun 28, 2009)
- Linux Troubleshooting Guide: Fix the Most Common Problems(Jun 10, 2009)
- Bash Tricks II: Repetitive tasks on files(Jun 07, 2009)
- 10 things you can do faster with the Command line(Jun 03, 2009)
- Switch to the Command line, Part 1(May 27, 2009)
-
Command line made easy: five simple recipes for grep(May 06, 2009)
- a little vi trick(Apr 30, 2009)
- Getting Into Linux the Easy Way (Linux for Beginners)(Apr 29, 2009)
- 10 Expert Ubuntu Tricks(Apr 14, 2009)