3 ms·
As a unix purist, the "scp" program seems kludgy and in-elegant. We already have "cp" for copying files, why do we need another program? The appropriate thing
by enriquto 6y ago
As a unix purist, the "scp" program seems kludgy and in-elegant. We already have "cp" for copying files, why do we need another program?
The appropriate thing to do is to mount the remote disk, and then use regular cp as God intended. Fortunately, this is possible today using "sshfs" (but there's still some ugliness in the fusermount implementation).
- rerx 6y agoOne could argue that this would be a bad abstraction because it hides the network layer.
- enriquto 6y agoOn the contrary. The only valid interfaces should be fopen, fread, fwrite and the like. The unix way is to mount the network as a filesystem cat /net/http/www.google.com this should render other tools like wget, curl, unnecessary.
- wahern 6y agoThat's the Plan 9 way. The "everything is a file" model mostly relates to exposing all objects as file descriptors that support read and write operations--specifically the read and write syscalls. IOW, everything is a file means the universal API for all objects[1] is read and write. How you acquire the descriptor is a fuzzy area. Using open on virtual namespaces makes alot of sense, but not always, and in any event no incarnation of Unix, not even Linux, supports virtual namespaces as comprehensively and seamlessly as Plan 9. [1] From a systems programming standpoint--kernel resources, IPC, etc. But there's an obvious relationship to, e.g., Smalltalk objects. (Just don't ask me what it is ;)
- enriquto 6y ago> Using open on virtual namespaces makes alot of sense, but not always Can you point to a specific and clear example of that "not always"?
- wahern 6y agoFor real unix purists user mounts don't exist. They were even removed from OpenBSD. Also, I'm pretty sure uucp predates VFS mounts over the network.
- enriquto 6y ago"pure unix" looks more like plan9 than openbsd