![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script for Deleting Core files on root filesystem | rgfirefly24 | Shell Programming and Scripting | 7 | 02-11-2008 01:41 PM |
| ftp selected jpeg files from unix filesystem | mhbd | UNIX for Dummies Questions & Answers | 3 | 12-12-2007 11:57 PM |
| Loopback files on a FAT based Filesystem? | deckard | Filesystems, Disks and Memory | 1 | 01-25-2007 02:24 PM |
| when I try to run rm on multiple files I have problem to delete files with space | umen | UNIX for Dummies Questions & Answers | 1 | 09-20-2005 12:20 AM |
| limit of files in the ufs filesystem | witt | UNIX for Dummies Questions & Answers | 2 | 06-25-2002 07:02 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
recurse through filesystem to delete files
howdy all --
I recently trashed my old PC and bought a MacBook. Moving all my files over, I find I've got a zillion instances of stupid Windows files like Thumbs.db and desktop.ini all over the place. I'm looking for a way to delete them all at once (deleting each manually would take forever), and I'm hoping there's an easy way to do it using the Unix terminal built into OSX... Basically, I'm looking for the "drill down through the file system, find every instance of X, and delete it" command... ...any suggestions are appreciated. |
| Forum Sponsor | ||
|
|
|
|||
|
Try this,
Code:
find / \( -name 'Thumbs.db' -o -name 'desktop.ini' \) -okay rm {} \;
To remove without any confirmation, use Code:
find / \( -name 'Thumbs.db' -o -name 'desktop.ini' \) -exec /bin/rm {} \;
Thanks. Nagarajan G |