[ale] Bash command to output filenames with complete path?

Geoffrey esoteric at 3times25.net
Thu Aug 15 07:49:13 EDT 2002


Rather than do the 'ls' every time you fire up your script, you could 
have a cron job that runs on a regular basis that builds your list.  As 
someone else noted, find is what you need if you want the full path, 
although if all the files reside in a single directory, you could do
'ls MP3DIRECTORY/*'  Yet, since you're using the -R option to 'ls' I 
suspect you have multiple directories.  Then again, if there is a finite 
# of directories you could again use ls in some way such as:

ls /home/andrew/mp3/DIR1/*.mp3 /home/andrew/mp3/DIR2/*.mp3 > 
/home/andrew/temp/mp3list

Assuming all your mp3 files have the extension 'mp3'.


Andrew Grimmke wrote:
> Hi everybody,
> 
> I know this is really simple stuff, but what i want to
> do is something like the following:
> 
> alias M1="ls -R /home/andrew/mp3/ >
> /home/andrew/temp/mp3list ; mpg123 -@
> /home/andrew/temp/mp3list -V"
> 
> so that with 2 keystrokes I can dump all my songs into
> a list file and begin playing them randomly.
> 
> The problem, of course is that, unless I cd to the
> directory first, I need the full path listed in mp3list.
> 
> If there is a switch for ls to do this I can't find it.
>  Any other suggestions?
> 
> Andrew Grimmke
> Marietta, Georgia
> 
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
> sent to listmaster at ale dot org.
> 
> 


-- 
Until later: Geoffrey		esoteric at 3times25.net

I didn't have to buy my radio from a specific company to listen
to FM, why doesn't that apply to the Internet (anymore...)?


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list