Results 1 to 2 of 2
If I use sftp and list a remote directory, I cannot pipe it to "less" or "more": $ ls |less results in an error. But if I just use ls ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-20-2005 #1
- Join Date
- Nov 2005
sftp problem: ls cannot be piped
If I use sftp and list a remote directory, I cannot pipe it to "less" or "more":
$ ls |less
results in an error.
But if I just use ls an tge directory contains a lot of files, i see just the last 20 or so.
What can I do to avoid that?
- 11-22-2005 #2
- Join Date
- Apr 2004
First of all: What is the error?
To take a guess, you are using sftp when you should be using ssh. sftp is supposed to be a secure replacement for ftp so it only accepts similar commands. When you try to pipe to less or more, you are telling it to list the pipe directory and the less directory (well, they could be files too, but you get my point).
If you can't use ssh, can you just let the text run off the top of the screen and then scroll up (shift+page up at the console)?
Hope that helpsTo be good, you must first be bad. "Newbie" is a rank, not a slight.