Friday, July 30, 2010

Delete some specific files from all subdirectories

February 23, 2010 by admin  
Filed under General

Useful unix-command trick to quickly remove i.e. Thumbs.db files, WS_FTP.LOG files or *.fla files, recursively through directories.

It could be a real pain on a huge directory tree ;-)

Removing all *.fla files from /home/user/ and subdirectories…

find /home/user/ -name *.fla -ok rm {} ;

Removing all WS_FTP.LOG files from /home/user and subdirectories…

# find /home/user -name WS_FTP.LOG -ok rm {} ;

Removing all Thumbs.db files from /home/user and subdirectories…

find /home/user -name Thumbs.db -ok rm -f {} ;

GD Star Rating
loading...
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Related posts:

  1. cPanel JailShell, Unmount and Clean Virtfs
  2. Effective Solutions for 500 error (Premature End of Script Headers)

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!