LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-16-2004, 01:50 PM   #1
Axion
Member
 
Registered: Jan 2003
Location: Albany, NY
Distribution: Slackware 9.1, Gentoo 2004.1
Posts: 153

Rep: Reputation: 30
recurse through subdirs?


i downloaded a tool called v2strip. it removes id3 tags from mp3 files. i have (almost) endless directories within subdirectories, within subdirectories, followed by mp3 files at the bottom of the tree. how would i tell linux to recurse into each subdir applying the command v2strip *.mp3 ? the tool itself does not support a -R parameter. I used a similar tool to v2strip under windows along with the sweep util from www.ca5e.tk allowing me to simply execute:

sweep v2strip *.mp3 and it would recurse through each subdirectory, and remove the id3 tags from every mp3 file it finds in the process. not sure how i would go about doing this under linux....i need it for some other tools aside v2strip as well. any information appreciated. thanks
 
Old 02-16-2004, 02:21 PM   #2
ajmoraal
LQ Newbie
 
Registered: Oct 2003
Location: Netherlands
Distribution: Debian
Posts: 5

Rep: Reputation: 0
Lightbulb

Try the find command:

find . -name '*.mp3' -exec v2strip {} \;

What it does:
It looks for files in current directory and subdirectories with the name *.mp3 and executes the command between '-exec' and '\;' on every file found. The {} token is replaced by the current filename.

Hope this helps,

Arjan

Last edited by ajmoraal; 02-16-2004 at 02:39 PM.
 
Old 02-16-2004, 02:27 PM   #3
Axion
Member
 
Registered: Jan 2003
Location: Albany, NY
Distribution: Slackware 9.1, Gentoo 2004.1
Posts: 153

Original Poster
Rep: Reputation: 30
wow that is very cool. in my research I tried something like this with the find tool and didn't work...this one works great, though. thanks a lot.
 
Old 02-16-2004, 08:56 PM   #4
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Debian + Ubuntu
Posts: 4,358

Rep: Reputation: 57
Does this work when the files contain escaped chars (ie spaces)? I have never got programmes to respect the spaces reported by find.
 
Old 02-16-2004, 09:12 PM   #5
Axion
Member
 
Registered: Jan 2003
Location: Albany, NY
Distribution: Slackware 9.1, Gentoo 2004.1
Posts: 153

Original Poster
Rep: Reputation: 30
yes, all my files have spaces and works fine
 
  


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
scp recurse but NOT overwrite? Goog Linux - Software 3 12-04-2012 09:55 PM
make, subdirs, and patsubst BorisMcHack Programming 1 04-09-2005 10:41 AM
disapearing and unaccessible subdirs NonSumPisces Linux - General 2 05-29-2004 12:51 PM
mounting subdirs dARkHunTEr Linux - General 2 11-04-2003 09:32 AM
How would you cp a file to multi subdirs? m0rl0ck Linux - General 2 03-04-2003 01:41 AM


All times are GMT -5. The time now is 09:05 PM.

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