Wednesday, November 18, 2009

Finding OSX Aliases in a SMB/CIFS Share

Just a quick follow up to my previous post.

In case it wasn't obvious - if you want to find all those OSX alias files it's just a simple

grep -r XSym /path/to/smbshare/on/server


If I had more of them I'd hack up a script to pull the path info out of them and create the symlinks automatically....

This is really hacky, but you can make symlinks out of alias files with it.
If a dragon appears and demands a dumptruck for a four-wheeler, don't blame it on me!

read NAME && LINK=$(tail -n 2 $NAME | head -n 1) && rm -v $NAME && ln -sv "$LINK" "$NAME"

No comments:

Post a Comment