[NTLUG:Discuss] rm doesn't recurse
terry
kj5zr at yahoo.com
Fri May 7 07:54:32 CDT 2004
George Lass wrote:
> find . -name \*.zip -exec rm -f {} \;
>
> Enjoy
> G
>
>
So, will both these scripts do the same?
for file in `find . -name "*.zip"`; do
rm $file
done
&
find . -name \*.zip -exec rm -f {} \;
In other words, it's just 2 different ways of doing the same thing?
I would experiment but can't think of any types of files I want to
delete right now. I'm thinking these commands would delete all files
with extension "zip" throughout the whole partition. If so, that's very
powerful.
More information about the Discuss
mailing list