![]() |
|
|
|
|
|||||||
| 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 |
| how to delete file names with $ in them | orahi001 | UNIX for Dummies Questions & Answers | 2 | 04-11-2008 10:06 AM |
| How do manipulate file path and names | siegfried | Shell Programming and Scripting | 2 | 09-28-2007 08:20 AM |
| Compare 2 list and delete certain names | eltinator | Shell Programming and Scripting | 12 | 08-22-2007 09:45 PM |
| total number of files which have "aaa" in files whose names are File*_bbb* | sudheshnaiyer | UNIX for Dummies Questions & Answers | 1 | 08-16-2007 11:34 AM |
| how to remove files with only numbers as file names? | praveen_indramo | Shell Programming and Scripting | 6 | 06-07-2007 06:13 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Recentily i receive virus ninda and my network was files *.eml.
I find all *.eml with: find / -name *.eml -print > virus Virus has the path and name of the file,so, How can i delete all *.eml? Thanks |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
First review that file called "virus" and be sure that you really want to delete all the files in it. Then you could use:
cat virus | xargs rm Another option: find / -name \*.eml -print | xargs rm Remember to put a backslash before (or otherwise escape) the asterisk in your find statement. If you don't the find will only work right if your current directory contains no *.eml files. |
|
#3
|
||||
|
||||
|
AlvaroD emailed me that the filenames contain embedded spaces. In that case, I would go with:
cat virus | xargs -i rm {} and find / -name \*.eml -exec rm {} \; |
||||
| Google The UNIX and Linux Forums |