Reputation:
I'am on Ubuntu 19.10 and using lftp 4.8.4
from lftp help, I see, I can use bash command using '!'
I like to list my local file: not remote!
ls
list remote file
!ls
, !dir
, !dir
list remote file too
lls
unknown command
lpwd
give me current local path but I like to list local file too!
Have I to open a new terminal to list local file?
Can you help?
best regards,
Leonardo
P.S. On man page I read:
!ls To do a directory listing of the local host.
but not work!
Upvotes: 3
Views: 3134
Reputation: 21
tl;dr: Update lftp; use lftp prompt> !command1; command2; ... commandn
to access the local shell commands.
LFTP | Version 4.9.2*:
lftp> !ls
displays the output of $ ls
lftp> local ls
displays the output of $ ls -l
Both lftp> !ls -ltr
& lftp> local ls -ltr
display the output of $ ls -ltr
lftp> !ls; !pwd
results in an error with !pwd command not being found by bash, $?=127
lftp> !pwd; ls; date
displays:
lftp [email protected]:/> !pwd; ls; date
/foo
bar
Thu Aug 15 09:17:45 AM EDT 2024
Which ultimately is what I believe you're looking for
On the other hand, using local does not find e.g., GNU date...
lftp [email protected]:/> local pwd; ls; date
file:/foo
Unknown command `date'.
lftp lftp [email protected]:/> local pwd; local ls; local date
file:/foo
total 0
-rw-rw-rw- 1 root root 0 Aug 15 23:26 bar
Unknown command `date'.
*GNU bash, version 5.2.21
Upvotes: 0
Reputation:
I have get a answer from other channel:
the right command is: local ls
the !ls
is wrong
Upvotes: 4