I was wondering how to connect to a network storage through the command line on my MacOSX computer, any tips?
migrated from stackoverflow.com Nov 14 '09 at 20:56
This question came from our site for professional and enthusiast programmers.
As said before it depends on sharing protocols.
You can connect to a server (while in Finder) with :
Cmd + k
You have to find out which protocol is used for sharing ... (smb, afp, ...) !
My first guess will be : smb (samba)
In the Server Address field enter:
Save it to your Favorite Server list (+ button)
Then hit Connect, your remote folder will automatically be mounted on your Desktop.
About command line (if the sharing is SMB) :
If you're trying to mount a file system you should use one of the mount_* commands.
As an example, I have a script that periodically mounts a SMB volume, copies some files and then unmounts:
This assumes you have permissions to create a directory in /Volumes. Any directory will do, really - you just need write permissions.
The URL for a mount point on a remote server if different for each protocol, check the particular man pages for more info.
In general, you need to create the mount point first using mkdir, but umount will delete it afterwards.