![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Delete all injected code recursively | ISOcrates | Shell Programming and Scripting | 2 | 03-24-2009 11:14 AM |
| recursively delete the text between 2 strings from a file | santosh1234 | Shell Programming and Scripting | 2 | 12-29-2008 11:01 PM |
| delete files recursively in the specified directory | deepthi.s | Shell Programming and Scripting | 3 | 08-13-2008 11:03 PM |
| delete files older than 5 minutes in directory (recursively) | scarfake | Shell Programming and Scripting | 3 | 06-13-2008 02:10 AM |
| List Files Recursively | roberthawke | UNIX for Dummies Questions & Answers | 9 | 06-24-2002 07:19 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Delete files Recursively *thumbs*.jpg
Greetings,
I need to delete all files that contain the word thumbs. Those files are spread all throughout sub-directories in a file directory tree. Is there a script or single line command that will find all files with the word thumbs, and simply delete the file? For example: Delete files Recursively *thumbs*.jpg Thank you in advance for your expertise. Regards, ..Chris.. Last edited by vbe; 06-29-2009 at 10:55 AM.. Reason: rm SPAM URL |
|
||||
|
change to the top level directory containing the files (using cd <dir>) and run:
find . -name \*thumbs\*.jpg -type f if this lists all the files you want to delete then run find . -name \*thumbs\*.jpg -type f -exec rm {} \; |
|
||||
|
Delete files Recursively *thumbs*.jpg
Sorry, for this additional question. You solution worked, and I had an s in the file name when trying your solution, and noticed it later.
Thank you for your reply. I attempted to list the files using the command below, but nothing showed up? There was no listing of files, but when in the directory, simply typing dir (bin/bash) lists the files that I want to delete. Code:
find . -name \*thumbs\*.jpg -type f Last edited by ..Chris..; 07-01-2009 at 12:10 AM.. |
![]() |
| Bookmarks |
| Tags |
| delete, file, pattern matching files, recursive |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|