LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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: 811

Rep: Reputation: 264Reputation: 264Reputation: 264
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,465

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
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 Addict
 
Registered: Jan 2011
Posts: 8,249
Blog Entries: 11

Rep: Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289Reputation: 2289
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: 811

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

Thanks again!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 03:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration