Manufacturing Information Solutions Forum Index Manufacturing Information Solutions
Your Place for Support and Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to delete useless Windows Files in Ubuntu Linux

 
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> Linux
View previous topic :: View next topic  
Author Message
mistux
Site Admin


Joined: 25 Jun 2004
Posts: 1042
Location: South Bend, Indiana USA

PostPosted: Thu Mar 27, 2008 1:53 pm    Post subject: How to delete useless Windows Files in Ubuntu Linux Reply with quote

After using Windows for a long time, my music and photos folder where filled with 'desktop.ini' and 'Thumbs.db' files. For a while I've been only using Ubuntu Linux, so I decided to delete those files.

To do it, you may use this command (have in mind that this goes throughout every sub folder in the selected path, so don't do it on the root folder):

Code:
find /my_path -type f -name "desktop.ini" -exec rm -f {} \;
find /my_path -type f -name "Thumbs.db" -exec rm -f {} \;


We may also use this command to delete album covers in our music folders:

Code:
find /music_path -type f -name "*.jpg" -exec rm -f {} \;


As you see, this can be used to delete any file (or type of file) recursively in folders. You may use it to delete other files, as long as you take care not to delete files you need or want.

If you want to examine the files that are going to be deleted before doing it, you should execute the same command, changing 'rm' for 'ls', like this:

Quote:
find /my_path -type f -name "desktop.ini" -exec ls -f {} \;


In this way you may control the list of files to delete.
I hope this helps.
Back to top
View user's profile Send private message Send e-mail
mistux
Site Admin


Joined: 25 Jun 2004
Posts: 1042
Location: South Bend, Indiana USA

PostPosted: Thu Mar 27, 2008 1:54 pm    Post subject: Reply with quote

or you could use the even shorter version:

Code:
find Music/ -type f -name "Thumbs.db" -delete
or
find Music/ -type f -name "Thumbs.db" -ls
Back to top
View user's profile Send private message Send e-mail
mistux
Site Admin


Joined: 25 Jun 2004
Posts: 1042
Location: South Bend, Indiana USA

PostPosted: Thu Mar 27, 2008 3:28 pm    Post subject: Reply with quote

This shows you how to find all the files:

Code:
find /media/disk/g2data -type f -name "Thumbs_db"


Can also use wildcard like:
Code:
find /media/disk/g2data -type f -name "Thumbs*"
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> Linux All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group