You are not logged in.

#1 2008-09-29 19:01:21

gazj
Member
From: /home/gazj -> /uk/cambs
Registered: 2007-02-09
Posts: 681
Website

thumbs.db, desktop.ini and friends

You know them annoying files that windows likes to leave around mad

Anyone know of a bit of bash that will go thorugh my ~ and delete them. smile

Thanks

Last edited by gazj (2008-09-29 19:01:39)

Offline

#2 2008-09-29 19:17:33

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: thumbs.db, desktop.ini and friends

on your ~:
$ find -name thumbs.db

check whether there's something that shouldn't be deleted on this list, and then
$ rm `find -name thumbs.db`

I guess it should work. (only if there are no spaces in the filenames, though)

Last edited by andre.ramaciotti (2008-09-29 19:21:30)


(lambda ())

Offline

#3 2008-09-29 19:21:08

gazj
Member
From: /home/gazj -> /uk/cambs
Registered: 2007-02-09
Posts: 681
Website

Re: thumbs.db, desktop.ini and friends

oh duh, thats so obvious, why didn't I think of that.

Thanks smile

Offline

#4 2008-09-29 20:30:55

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: thumbs.db, desktop.ini and friends

even easier:

find ~ -iregex '.*/thumbs.db\|.*/desktop.ini' -delete

Last edited by ezzetabi (2008-09-29 20:31:29)

Offline

#5 2008-09-30 13:48:11

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: thumbs.db, desktop.ini and friends

Just as a note, it's Thumbs.db, and desktop.ini. Case matters ;P

I have a find -delete in cron for those files, since I get file transfers from a windows friend fairly often.

Offline

#6 2008-09-30 13:57:19

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: thumbs.db, desktop.ini and friends

it is -iregex (not -regex) case does not matter.

Offline

#7 2008-09-30 17:54:53

gazj
Member
From: /home/gazj -> /uk/cambs
Registered: 2007-02-09
Posts: 681
Website

Re: thumbs.db, desktop.ini and friends

Thank you ezzetabi works great.  I did know it was Thumbs, just for some reason used lowercase in my initial post smile

Offline

#8 2008-09-30 19:31:54

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: thumbs.db, desktop.ini and friends

It's lowercase, Windows makes no distinction between cases.


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

Board footer

Powered by FluxBB