Tech Tip of the Day: Quick file deletion
Posted by John Minnihan - 18/09/06 at 10:09:52 amHere’s another quick tip. If you have a large directory tree (hundreds or thousands of nested levels), and you need to find and delete a set of files from the tree, consider this one-line approach:
cd [target-dir-top-level];for i in `find . -name \*tar.gz`; do rm -f $i; done
Replace my pattern ‘tar.gz’ with one that matches the files you wish to delete.
Tags: freepository, tech-tip, shell scripting
Popularity: 7% [?]
-
John Minnihan
Powered by WordPress and |
themesbase with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds.
Valid XHTML and CSS.
Found a new radio station in Denver today,