Discussion Locked

command line ftp

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Quick question that has always driven me nuts. When doing an 'ls' or 'dir' in command line ftp, is there an option to stop the directory listing from scrolling off the screen. Basicly the equivalent to an 'ls -l |more' Have never been able to figure that one out.

Also maybe someone has the answer to this one. I cannot figure out why when I telnet into some unix systems and issue any command where I pipe it to 'more', it just sits there and does not display the output. But if I press 'q', as if to get out of the 'more' command and then type 'clear', I am able to exit out and get back to a command prompt. It is as if the first command had actually run, but was just not displaying the output. My TERM type is set to vt100. Maybe it is a lines problem? I hope someone else know what I am talking about. It is just one of those annoying things I would love to find the solution to.

Thanks for any help you can give on either of these problems.

5 replies

by fossil

The workaround I use for the "scrolling problem" is to increase my screen buffer size to 999 lines. This can be done for both the CommandPrompt and Telnet. For the CommandPrompt you would do it by:
1) Alt+Space : P to open the Properties
2) Layout Tab : ScreenBUffer Size : Height
3) click OK

For Telnet:
Menu : Terminal : Preferences : Buffer Size

On the second issue, my conjecture is that some translation of the "vertical bar" might be taking place on either side of the telnet session. Another possiblility could be that the ".profile" execution is different on some systems. It is possible, on a system by system basis, to control whether or not group profiles execute as well. The "beauty" of unix is that each time one tries the exact same action, it has the potential to becaome true learning experience.

by shanghai sam

Thanks for the input. I get the feeling for the command line ftp you are talking about in win2k where you actually have a scroll bar. Is there any workaround like that for win98?

For my telnet problem, the vertical bar - I assume you are you talking about this | vertical bar. Strangly I also have this problem with the 'man' pages on the same systems that I have problems with the | command. Not quite sure what to make of it. Any ideas?

Thanks for the help.

by wls

I believe the answer to your question is, no, you can't do it via piping the output of an internal FTP command...

However, here's how you get the behavior you want:
ftp> ls . x
output to local-file: x? y
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
ftp> !less x

What you're doing is saving the output of the ls command to a file, then invoking the shell to view the file with any viewer you want.

Round about, I know, but FTP was meant to transfer files, not be pretty.

Extra bonus points: play with ncftp ("nice FTP"), you may find it has a lot more ammenities for console usage.

by shanghai sam

'ls . x' Then read the x file it outputs. Yea. Very nice!! That is something that has always bugged me when I have to use command line ftp. That is a handy little workaround. Thanks so much for the help. I really appreciate it. I will also check out ncftp. Thanks!!

This discussion is closed to new replies.