[comp.unix.questions] How to view files from FTP.

colello@oxy.edu (Robert Scott Colello) (02/08/91)

Hi,
  I just got an account on a NeXT system with Unix.  How can I view files
before I download them to the NeXT via FTP.  Is there any sort of "cat"
command for FTP.  Help!!

Bob Colello

colello@oxy.edu
colello@cub.oxy.edu

Thanks in advance

dslg0849@uxa.cso.uiuc.edu (Daniel S. Lewart) (02/10/91)

colello@oxy.edu (Robert Scott Colello) writes:

> Hi,
>   I just got an account on a NeXT system with Unix.  How can I view files
> before I download them to the NeXT via FTP.  Is there any sort of "cat"
> command for FTP.  Help!!

ftp> get remote-file -
	OR
ftp> get remote-file |more
	OR
ftp> get remote-file |less

Daniel Lewart
d-lewart@uiuc.edu

emv@ox.com (Ed Vielmetti) (02/11/91)

i use (when the occasion warrants it)
	ftp> get file.Z "| zcat | less"
note the quotes if there are embedded spaces in the command.

--Ed

gwyn@smoke.brl.mil (Doug Gwyn) (02/11/91)

In article <143291@tiger.oxy.edu> colello@oxy.edu (Robert Scott Colello) writes:
>  I just got an account on a NeXT system with Unix.  How can I view files
>before I download them to the NeXT via FTP.  Is there any sort of "cat"
>command for FTP.  Help!!

No, because to get the file to you for viewing already constitutes a
download of the file.  Most FTPable files are not text files anyway.
For those that are, how about opening a second window and peek at them
while they're in the process of downloading.

jeff@onion.rain.com (Jeff Beadles) (02/17/91)

If the file is a plain text file, then I usually just use:
ftp> get filename /dev/tty

	-Jeff
-- 
Jeff Beadles		jeff@onion.rain.com

thad@public.BTR.COM (Thaddeus P. Floryan) (02/18/91)

In article <1991Feb16.162116.8799@onion.rain.com> jeff@onion.rain.com (Jeff Beadles) writes:
>
>If the file is a plain text file, then I usually just use:
>ftp> get filename /dev/tty

Actually, the following is more (no pun!) convenient, esp. to prevent
scrolling off the top of one's screen:

ftp> get file |pager
              ^^
NOTE: no spaces between "|" and "pager", and "pager" should be the name of
the viewer you wish to use (i.e. less, more, pg, whatever).  This trick also
is convenient for dir listings per:

ftp> ls -lR |pager

Thad Floryan [ thad@btr.com (OR) {decwrl, mips, fernwood}!btr!thad ]