Question/Warning about potentially dangerous lftp default.
I was playing around with lftp today, and I discovered that it has
what I would call a particularly non-intuitive (and dangerous) default
behavior for the mirror command. Say you are in your home directory,
and you log in to some machine which contains a directory named foo,
and you type "mirror foo". I would have expected this to create a
local directory named foo which was an exact duplicate of the remote
foo. However, what actually happens is that lftp makes the current
directory (in this case your *home* directory) an exact mirror of foo,
silently deleting all the files in it, and replacing them with the
contents of the remote directory.
At the very least I think this should be documented somewhere,
preferrably in bold screaming type, but ideally I think the default
should be changed to create the mirror in a local directory with the
same name as the remote directory unless you say "mirror foo ."
Was I just being stupid, or do others think this is counterintuitive?
If so I'll file a real bug report.
Good thing I had backed up earlier that day...
--
Rob
Reply to: