Posts Tagged cli

installing applications remotely on mac

To use a dmg disk image you would use:
hdiutil mount thefile.dmg
You then have a /Volumes/The\ Application.
In that directory you would usually either have an or a Application.pkg directory.

  • If it’s an .app file, just copy the files to your /Applications/ directory:
    sudo cp /Volumes/The\ Application/ /Applications/
  • f it’s a .pkg file, run:
    sudo installer -package Application.pkg -target /Volumes/Mac\ OS

That’s it !

Leave a Comment

recursive scp and symlinks

To copy recursively with scp, you use scp -r.
The thing is that if you have symlinks in your directory the content of the directory being pointed to by the symlinks will be copied, this is not necessarily what you want (the symlink will be followed instead of being preserved).
Scp have no option to specify that you don’t want to follow symlinks.
If you want to preserver symlinks, you should use rsync:
rsync -avz -e ssh /src/dir

Be carefull, if you preserve symlinks, the newly created symlinks on the remote server can point to a non existant path.
It’s strange that scp seem to have no option to not follow symlinks. If you’re aware of one, please drop me a comment !

Comments (2)