On 7/12/2014 7:35 AM, Kees Nuyt wrote:
>> So I connect without wildcard. Then I can use a wildcard here:
>> sftp> ls ju*
>> junk/backhd_asus10 junk/deb7xfce20140704 junk/to_bigdrive
>>
>> but not here:
>> sftp> cd ju*
>> Couldn't canonicalize: No such file or directory
>
> That makes sense, because you can not change to more than one
> directory at a time.
This doesn't work either:
sftp> cd ju*/
Couldn't canonicalize: No such file or directory
>
> Script it in shell with scp, rather than use sftp.
> As a bonus, scp can do a bit more with wildcards.
Then the choice is between 1) more scripts than I can keep track of or
2) re-editing a single script, with the same problem of typing long
pathnames, and more steps than an interactive method. I don't see an
advantage over using environment variables as shortcut names for
frequently used directories on the remote machine.