You are not logged in.

#1 2008-02-25 19:43:31

tony5429
Member
Registered: 2006-03-28
Posts: 1,020

Simple Linux Bash Question Regarding Find command

Right now I've got a script with this line to find all mp3's in a directory and subdirectories...

find . -iname '*.mp3'

I would very much like to separate this into two different lists of mp3s. I need one list of the mp3's which are in subdirectories, and one list of the mp3's which are in the current location. I have looked at man pages of the find command and cannot see how to do it. Any ideas, anyone? Thanks!

Offline

#2 2008-02-25 20:05:04

gradgrind
Member
From: Germany
Registered: 2005-10-06
Posts: 921

Re: Simple Linux Bash Question Regarding Find command

Would the '-maxdepth' and '-mindepth' options be of any use to you?

Offline

#3 2008-02-25 21:24:41

tony5429
Member
Registered: 2006-03-28
Posts: 1,020

Re: Simple Linux Bash Question Regarding Find command

Exactly what I needed. Thanks!

Offline

Board footer

Powered by FluxBB