[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh again



On Qua, 15 Jun 2016, Dan Purgert wrote:
It is "redundant" in the sense that you move all the way into
/home/lisi/pictures/, and then say 'this directory here' (with ./).  BUT
as emetib mentions, being an explicit "this directory here" command will
ensurethat the system dumps the file(s) into the directory you expect;
or fail out in the event that the destination is not a directory (as it
would in this case -- pictures are typically stored in
"$HOME/*P*ictures".  Remember, capitalization counts).

OK, but wouldn't /home/user/Pictures/ (note trailing slash) also fail in case there isn't a directory Pictures or it's a file? What does "/./" add that "/" doesn't do?

Without the "/./" characters, if you were using something like "scp
/path/to/files/*.jpg user@host:/home/user/destination" and "destination"
was not already a directory, the system would happily copy every file
over the previous one (naming each one 'destination').

I can't tell what scp does in this case (and can't try right now), but regular cp fails with a message saying that 'destination' is not a directory. I'd imagine scp does something similar.
--
Eduardo M KALINOWSKI
eduardo@kalinowski.com.br



Reply to: