Discussion:
Version 4.4.1 Request/Question
b***@lavabit.com
2013-02-02 15:39:03 UTC
Permalink
First, thanks for this outstanding sftp client.

First, I noted that the progress bar was removed in this release when
running non-interactively. Would it be possible to add a verbosity level
to enable this feature instead of automatically turning it off? It is
useful when mirroring files to indicate a network problem, as well as the
progress and speed of the current transfer.

Secondly, I'm using the following command (googled) to mirror select files
and directories using a glob:

lftp -c "glob -d -- mirror -c --use-pget-n=4 --verbose
sftp://somehost.com/~/dir/*somefilename*"

If "somefilename" is a directory it will match and mirror the directory
and its contents. If it is a single file it does not match. I then tried
this:

lftp -c "mirror -c --use-pget-n=4 --verbose -I *somefilename*
sftp://somehost.com/~/dir/."

IIRC, this matches files but not directories.

Can someone provide a non-interactive solution that will glob both
directory and individual files?

Thanks for any suggestions.
Alexander V. Lukyanov
2013-02-06 11:29:04 UTC
Permalink
Post by b***@lavabit.com
First, I noted that the progress bar was removed in this release when
running non-interactively. Would it be possible to add a verbosity level
to enable this feature instead of automatically turning it off? It is
useful when mirroring files to indicate a network problem, as well as the
progress and speed of the current transfer.
"set cmd:interactive yes" command should enable the status line again.
Post by b***@lavabit.com
lftp -c "mirror -c --use-pget-n=4 --verbose -I *somefilename*
sftp://somehost.com/~/dir/."
IIRC, this matches files but not directories.
Can someone provide a non-interactive solution that will glob both
directory and individual files?
You can include both the file and directory:

lftp -c "mirror -c --use-pget-n=4 --verbose -i "^*somefilename*($|/)"

But the *somefilename* should have meta-symbols quoted.
--
Alexander.
Continue reading on narkive:
Loading...