Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'bash oneliner for same' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
bash oneliner for same
Authored by: wmertens on May 14, '04 07:56:52AM
This is how I did it with bash, without needing lndir

find /Applications -type d -name \*.app -print -prune | while read i; do
    a=~/"$i"/; if [ ! -d "$a" ]; then
        echo Linking "$i"
        mkdir -p "$a"
        for j in "$i"/*; do
            ln -s "$j" "$a"
        done
    fi
done
Just cut'n'paste it into a Terminal (bash will handle the newlines just fine), run it, and you will have a full tree with only the bare minimum of links needed for it to work.

[ Reply to This | # ]