Recursively Deleting Files in UbuntuLinux

Neat way to recursively delete files in directory specified from command line....

find /media/data/Images -name \*.gif -exec rm {} \;


Source: Adapted from TechRecipes
In the example above, I'm deleting GIF image files from the Images directory. Saves me the trouble of clicking my way through a few zillion folders.

REMOVING EMPTY DIRECTORIES RECURSIVELY
Careful with this command...switch to the parent directory where you have all the empty directories, and then execute the following to remove all empty directories.
find -depth -type d -empty -exec rmdir {} \;

PingIt!
Delicious Bookmark this on Delicious
Subscribe to Around the Corner-MGuhlin.org


Everything posted on Miguel Guhlin's blogs/wikis are his personal opinion and do not necessarily represent the views of his employer(s) or its clients. Read Full Disclosure

Comments

Popular posts from this blog

Rough and Ready - #iPad Created Narrated Slideshow

Old Made New: Back to Bunsen Labs Linux (Updated)

The Inside Scoop: EdTech 2020 Virtual Conference #edtech #zoom