views:

58

answers:

3

Hi all,

Is it actually possible to upload symlinks and keep them as symlinks as opposed to uploading the files they're pointing to?

I have a directory structure that relies on symlinks and I'm looking for a way to send this to users who have no command line knowledge and would want to upload it to their servers.

Is there a way to create symlinks so that they're uploadable as symlinks? If not, is there an approach you could recommend?

Thanks!!!

+1  A: 

Try tar-ing the directory structure into an archive? The users can then un-tar it on the other end.

Amber
By tar-ing the directory structure, you're still including the files. Can't have symlinks pointing to non-existent files. But, yes, I'm agreeing with Dav, this method avoids the users having to recreate the symlinks -- but will they have to use the command-line to untar the uploaded file?
pavium
I don't think the OP actually had an issue with including the files; they just didn't want to include multiple copies of the same file per symlink (rather, they wanted to symlinks to stay, well symlinks). At least, that's how I read it.
Amber
A: 

thanks for the answers!

@Dav yes, that's definitely what I meant! I still need to upload the targeted files

@pavium you have a point though re: needing the command line to untar the uploaded file... , still i will look into it as it provides a packaging solution

I may have found another solution though, it seems PHP could handle the job with the symlink() function which could prove quite handy as all my symlinks are relative not absolute, meaning I could possibly create symlinks on the server without the need of a specific server information.

PatrickS
A: 
rsync -avlzp /path/to/folder user@somemachine:/path/to/new/folder
Paul Betts