km3t@jjmhome.UUCP (Dave Pascoe KM3T) (11/16/89)
Is it possible to list text files during an ftp connection? I had heard of sending remote commands (e.g., cat) while in ftp but don't know for sure. If it's possible, what is the syntax for sending remote commands? -- | Internet: pascoe@edcd.GTE.COM or pascoe%edcd.GTE.COM@relay.CS.NET Dave Pascoe | km3t%jjmhome@m2c.m2c.org KM3T/1 | UUCP: {backbone}!m2c!jjmhome!km3t | Packet Radio: km3t @ k1ugm.ma.usa.na
krol@ux1.cso.uiuc.edu (Ed Krol) (11/16/89)
km3t@jjmhome.UUCP (Dave Pascoe KM3T) writes: >Is it possible to list text files during an ftp connection? I had heard >of sending remote commands (e.g., cat) while in ftp but don't know for sure. >If it's possible, what is the syntax for sending remote commands? Yes the easiest way is to do a 'get foo -' where foo is the filename which is copied to standard output. (This is I believe only a unixism)
dd26+@andrew.cmu.edu (Douglas F. DeJulio) (11/16/89)
km3t@jjmhome.UUCP (Dave Pascoe KM3T) writes: > Is it possible to list text files during an ftp connection? Some ftp clients let you "get" to a file named "-", meaning the display. So, typing "get foo.txt -" would show foo.txt on your screen. -- Doug.deJ | dd26@andrew.cmu.edu | Carnegie-Mellon University ******** | ...!harvard!andrew.cmu.edu!dd26 | Do not attend this college.
roy@phri.UUCP (Roy Smith) (11/16/89)
In article <4579@jjmhome.UUCP> km3t@jjmhome.UUCP (Dave Pascoe KM3T) writes: > Is it possible to list text files during an ftp connection? Many ftp clients allow you to use "-" as a local filename to mean standard input or output, as appropriate. Thus "get remote -" prints the remote file on your terminal. -- Roy Smith, Public Health Research Institute 455 First Avenue, New York, NY 10016 {att,philabs,cmcl2,rutgers,hombre}!phri!roy -or- roy@alanine.phri.nyu.edu "The connector is the network"
trn@aplcen.apl.jhu.edu (Tony Nardo) (11/17/89)
roy@phri.UUCP (Roy Smith) writes: |In article <4579@jjmhome.UUCP> km3t@jjmhome.UUCP (Dave Pascoe KM3T) writes: |> Is it possible to list text files during an ftp connection? | Many ftp clients allow you to use "-" as a local filename to mean |standard input or output, as appropriate. Thus "get remote -" prints the |remote file on your terminal. Failing this, you can always use /dev/tty (Unix), TT: (VMS), or whatever your generic terminal name is as your output device on a remote "get". -- Tony Nardo, INET: trn@warper.jhuapl.edu, trn@aplcen.apl.jhu.edu Johns Hopkins Univ./APL UUCP: {backbone!}mimsy!aplcen!trn Quote(s) relocated to my finger .plans
natei@sco.COM (Nathaniel Ingersoll) (11/18/89)
In article <4579@jjmhome.UUCP> km3t@jjmhome.UUCP (Dave Pascoe KM3T) writes:
:Is it possible to list text files during an ftp connection? I had heard
:of sending remote commands (e.g., cat) while in ftp but don't know for sure.
:If it's possible, what is the syntax for sending remote commands?
you can always try, on UNIX,
ftp> get remotefile /dev/tty
which will dump it to your screen.
--
________________________________________________________________________
ado@BBN.COM (Buz Owen) (11/18/89)
There is no official protocol feature in ftp to support execution of arbitrary commands on the server -- although there has occasionally been, in the past, an XCMD command, in various Unix ftp servers. One could enter it using the quote feature of the ftp user process, and the server would run the command supplied, and return the output as a multiline reply. (This is one way to impliment the LIST command under Unix, using "ls -l" as the command.) I haven't seen XCMD in any ftp server I've used recently -- it is probably considered unsafe. If "cat" is all you want to do, try RETRieving to local filename /dev/tty or equivalent, or to |more or |page (or |cat) if you are on a bsd based system.
guy@auspex.auspex.com (Guy Harris) (11/22/89)
>> Is it possible to list text files during an ftp connection? >Some ftp clients let you "get" to a file named "-", meaning the >display. Any UNIX worth its salt should let you "get" to a file named "/dev/tty", meaning the user's terminal, so even if "-" doesn't work it should be possible. Of course, this just dumps it directly to the terminal, so if neither your terminal or terminal emulator nor your system's tty driver pauses at the end of a screenful of data, you'd better be a fast reader or be running over a slow link....
mckenney@aai8.itstd.sri.com.uucp (Paul E. McKenney) (11/23/89)
>> Is it possible to list text files during an ftp connection? >Some ftp clients let you "get" to a file named "-", meaning the >display. Some (UNIX) ftp clients allow the following sort of thing: get file |more The following also can be of use: get file.Z "|zcat > file" get file.Z "|tar -xvf -" get file.Z "|zcat | tar -xvf -" get file.txt |lpr In the implementation I have been using most recently (SunOS 4.0.3), the quotes are needed if the command contains spaces. Thanx, Paul
mcc@WLV.IMSD.CONTEL.COM (Merton Campbell Crockett) (11/26/89)
WIN/TCP also supports "get filename -" construct for the VMS world. Merton