Alias: Copying or compressing the original files referenced by aliases

I have a folder that contains aliases to files scattered to and fro on my drives.
I would like to compress said folder with the contents of the original files, rather than the aliases (which would be of no use to someone else).
I’ve tried compress from finder, and zip and gzip from the terminal, to no avail.
Any suggestions?


Take a look at this post on StackExchange.

1 Like

I don’t think you can do this (but I’ll be watching to see if you can)

An alias contains the inode, where a hard link contains
the inode and the path.

So I think you could do it with a hard link, but not with an alias.

1 Like

Thanks for the replies. I wound up working around it. I had aliased a bunch of files into a folder structure that I then wanted to compress to upload to a repository. Here’s what I finally did:

cd to_folder_of_aliases
find . -type f | grep -v DS_Store >file_list

Then I edited the file in Textmate using multiple cursors and turning the string of file names into cp commands. I was originally going to use xargs, but parsing out sub-folder names looked like it was going to be a chore.
Overall, not too painful for a one-off.

Probably could have:

cd to_folder_of_aliases
find . -type f | grep -v DS_Store | xargs -I {} cp {} ../new_folder/{}
1 Like