You probably know that if you do Apple-K in the Finder, you can type in an ftp address (ftp://...) and then point and click your way through a public ftp server. You can do the same thing at the command line with "mount_ftp":
mount_ftp ftp://foo.bar.com ~/desktop/foobar
You can then copy files from ~/desktop/fobar. "ls ~/desktop/foobar" and so on. Of course it's not really mounted in the traditional sense, but the illusion is maintained and as far as any program or script is concerned, this is just a rather slow directory.
You can eject the volume from Finder or use "umount":
However, it's possible to get umount confused. I did this:
mount_ftp ftp://foo.bar.com /tmp/b
On OS X, /tmp/is a symbolic link, so the mount shows up like this:
ftp://ftp.foo-bar.com on private/tmp/b (nodev, nosuid, read-only, mounted by tony)
That works (I changed the actual name here), but it won't unmount:
2.05b$ umount /tmp/b umount: /private/tmp/b: not currently mounted 2.05b$ cd 2.05b$ umount private/tmp/b umount: unmount(private/tmp/b): No such file or directory 2.05b$ umount /private/tmp/b umount: /private/tmp/b: not currently mounted 2.05b$ cd / 2.05b$ umount private/tmp/b umount: /private/tmp/b: not currently mounted 2.05b$ umount -a -t ftp -v 2.05b$ umount ftp://foo-bar.com umount: ftp://foo-bar.com: not currently mounted
The Finder couldn't eject it either. The only way to unmount was to do this:
2.05b$ cd / 2.05b$ umount -f private/tmp/b
The "-f" is necessary, as is the "cd /". Note that "umount -f /private/tmp/b" won't work: I had to be in / and "umount -f private/tmp/b".
Got something to add? Send me email.
Increase ad revenue 50-250% with Ezoic