Wednesday 26 January 2011

How to symlink all files in a directory

It seems that a simple ln -s /dir/* doesn't work, so:

for f in $(ls -d /base/*); do ln -s $f /target; done && ls -al /target



From commandlinefu.com