Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need romeve a specific files

Status
Not open for further replies.

netmen

IS-IT--Management
Dec 18, 2000
2
MX
I would like to remove a specific files from meny directories which same name.
How can do it?
 
Parent-dir is a dir above the many directories
fileToBeRemoved is the specific file.

find /parent-dir -name fileToBeRemoved -exec rm {} \;

be careful !

Test the command fist by:
find /parent-dir -name fileToBeRemoved -exec echo rm {} \;
Now it wil only echo fileToBeRemoved.
When you are sure the command is correct, remove the echo and
execute to command again.

success Gregor.Weertman@mailcity.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top