LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-22-2014, 03:37 PM   #1
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
Search directories recursively and delete a file with a certain name


Hi,
I have a server that I use to backup everything to. I use both Windows and Linux clients. I Windows likes to throw in extra junk files, like "Thumbs.db" and "desktop.ini" and I would like to remove all of them on the server and the Linux clients. Is there a way to do this?

Thanks
 
Old 05-22-2014, 03:42 PM   #2
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Code:
find /path -name Thumbs.db -delete
Test it without the '-delete' first.
'man find' for more options.
 
Old 05-22-2014, 03:45 PM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
too slow. Gotta go.

Bookmark this
 
Old 05-22-2014, 06:03 PM   #4
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Original Poster
Rep: Reputation: 265Reputation: 265Reputation: 265
Thanks! The 'find' command worked perfectly! I need to look into it some more...

Thanks again!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Search for specific type of file recursively koshy Linux - Newbie 4 03-02-2013 03:15 AM
[SOLVED] Need python script to create .menu file (recursively read directories) tonyfreeman Programming 1 11-05-2010 12:31 PM
How to search all directories for a file in bash overlook1977 Linux - Newbie 7 04-10-2007 07:00 AM
how to search for and delete empty directories? BrianK Programming 4 06-03-2005 07:24 AM
How to delete the first line of evrer .java file recursively ththomas Programming 2 03-08-2004 08:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration