Recursive symbolic linking question
Jason Munro
jason at stdbev.com
Tue Jun 21 12:04:16 CDT 2005
On 4:21:11 pm 06/13/05 "Rob Becker" <rbecker at kcai.edu> wrote:
> I have a bunch of oggs in a partition called autotunes that are
> organized into directories by artist and then subdirectories by album.
> I am using ogg123 to play the files. As best I can tell, ogg123 does
> not have the ability to recursively select files from a nested
> directory structure. I need to have a symbolic link for each ogg
> appear in the /autotunes directory. I can get a list of all the oggs
> by just using locate *.ogg. I can dump that to a file with a
> redirection, but how can I use that file to create the symbolic links
> automatically? I assume that I'm needing to write a script to
> accomplish this task. I'm not at all familiar with perl, so I would
> prefer to use bash if possible. Does anyone have any pointers? I am
> somewhat familiar with bash scripting, but I'm a bit rusty so I could
> use a bit of a quick refresher if anyone has any links or advice to
> offer. Please don't suggest that I switch media players or anything
> of that sort. This is a music player for my car that has limited
> disk space that I want to conserve for the storage of the music.
> Thanks very much for any help you can offer.
> Have a great day.
> Rob
How about this, from the top level dir where you want the symbolic links:
find -type f | xargs -I '{}' ln -s {} .
\__ Jason Munro
\__ jason at stdbev.com
\__ http://hastymail.sourceforge.net/
More information about the Kclug
mailing list