LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-15-2004, 08:53 PM   #1
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
console scripting help


This is probably a pretty basic question, I've got a huge library of mp3s but I downloaded about half in windows so some of the directories have desktop.ini files and thumbs.db files in them. This is stuffing up Rhythmbox when I try to import the whole directory.

Back on topic, I know that I can run this to get a list of all the files I need to delete
Code:
# find /media/Library | grep -e ini$
but is there a way I can rm all those files without doing it manually. It's not that big of an issue but I figure I could use this as a learning experience

Thanks
 
Old 12-15-2004, 09:00 PM   #2
amfoster
Member
 
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365

Rep: Reputation: 36
well, you can always use the -exec option to find.

example:

find . -name "*.ini" -o -name "*.db" -exec rm {} \;
 
Old 01-12-2005, 02:04 PM   #3
arjen
LQ Newbie
 
Registered: Jan 2005
Posts: 1

Rep: Reputation: 0
You may also use the xargs command:
Code:
find /media/Library | grep -e ini$ | xargs rm
cheers!
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Scripting help please deepsix Linux - General 5 09-07-2005 09:50 PM
Linux Console Scripting robsamms Linux - General 3 02-25-2005 07:23 AM
scripting help Abe_the_Man Linux - General 1 11-03-2004 05:30 PM
How to Run Win32 Console App in linux Console Lokie Linux - Software 2 08-12-2004 10:00 PM
X server in console 1 crashes on return from console 2 fieldmethods Red Hat 4 09-05-2003 12:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:15 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