Page 1 of 1

remove a list of files in linux

Posted: Tue Jan 05, 2010 9:24 pm
by mister_v
I want to remove a bunge of tar.gz files.

remove a list of files in linux

but I don't know how to do it.

find . -name tar.gz > temp.file

But then?

Re: remove a list of files in linux

Posted: Tue Jan 05, 2010 9:30 pm
by Chris
Try this

Code: Select all

find . -name tar.gz -exec rm -f {} \;
You might want to copy them first before deleting them.