1

Create symbolic links with wildcards

view story
linux-howto

http://unix.stackexchange.com – I have multiple hard drives with the same directory hierarchy, for example: /media/sda/dir1 /media/sda/dir2 ... /media/sdb/dir1 /media/sdb/dir2 Two hard drives with similar names and similar directory names. I want to create separate symbolic links to dir1 and dir2 on every hard drive. The easiest way I have found is to use cp -sR: cp -sR /media/sd*/dir1 /somedir/dir1 cp -sR /media/sd*/dir2 /somedir/dir2 However, this creates new directories in /somedir which has various side effects, for example, the directory timestamps are useless. How can I create symbolic links named dir1 and dir2 (HowTos)