Friday, July 20, 2012

Delete some specific files from all subdirectories

February 23, 2010 by  
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. Fastest way to install WordPress is through cPanel
  2. Install WordPress using Fantastico in cPanel
  3. cPanel JailShell, Unmount and Clean Virtfs
  4. fork: resource temporarily unavailable ???

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!