Re: [linux-audio-user] batch creation of symlinks

From: Frank Barknecht <fbar@email-addr-hidden>
Date: Sun Jul 09 2006 - 16:25:39 EEST

Hallo,
Frank Barknecht hat gesagt: // Frank Barknecht wrote:

> Almost, but you're trying to link a file on itself here ("$i->$i").
> Use this instead:
>
> $ for i in ./dir1/*.mp3; do ln -s $i . ;done
>
> or even more general:
>
> $ for i in */* ; do ln -s $i . ; done

In case you didn't recognize the difference to your first try: You can
use a directory as the second argument to ln as well, then it will
create a link with the same name as the basename of the file in the
first argument in that directory. All the backtick and find tricks
suggested in the other answers of this thread are nice, but way
overkill to your problem.

Keep it simple, stupid. ;)

Ciao

-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
Received on Sun Jul 9 20:15:01 2006

This archive was generated by hypermail 2.1.8 : Sun Jul 09 2006 - 20:15:01 EEST