[GLLUG] using find and xargs to remove files

Dustin Clute dclute at gmail.com
Tue Apr 4 20:17:40 EDT 2006


You could of also done the following.

# find /  -type f -name Thumbs.db -exec rm {} \;


Dustin

On 4/3/06, Caleb Cushing <xenoterracide at gmail.com> wrote:
>
> I'm trying to remove the crappy remnants of windows on my linux box. one
> thing I want to get rid of is the Thumbs.db and desktop.ini files that
> were in my music folder and got copied over. I was trying to do it by piping
> find to xargs but that isn't working. It should and I'm trying to figure out
> why it isn't. I know I could just use the -exec option  but now I just want
> to know why what I'm trying to do isn't working.
>
>          # find / -name "Thumbs.db" | xargs rm
>
> according to this http://www.unixreview.com/documents/s=8274/sam0306g/that should work...
> I've tried variations
>
>          #find / -type f -name "Thumbs.db" -print | xargs rm
>
> and all sorts of other things. I usually get this
>
>           xargs: unmatched single quote
>
> I looked the error up and what I found was of no help. at least to me... I
> didn't get it. Can someone tell me what I am doing wrong and how to do it
> properly?
>
>
>
> _______________________________________________
> linux-user mailing list
> linux-user at egr.msu.edu
> http://mailman.egr.msu.edu/mailman/listinfo/linux-user
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.egr.msu.edu/mailman/public/linux-user/attachments/20060404/1df31c1b/attachment.html


More information about the linux-user mailing list