Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!decwrl!apple!portal!cup.portal.com!thad From: thad@cup.portal.com (Thad P Floryan) Newsgroups: comp.sys.amiga Subject: Re: Help with FTP Message-ID: <32400@cup.portal.com> Date: 3 Aug 90 08:05:05 GMT Organization: The Portal System (TM) Lines: 78 jac423@leah.Albany.Edu (Jules Cisek) in <3440@leah.Albany.Edu> writes: Okay, I've been using FTP for a year and I still don't know how to capture a long directory. The only way I've been able to read the first entries in a multi-page directory is through a buffer on a computer (but what if I'm at a terminal), or by using low baud and doing a dir. Is there any way to get a directory listing that's more than one page long? It's really driving me crazy since I can usually only get files that start with the letter h or higher... :) Simple. First cd to the "top" directory of interest, then issue an 'ls' with the output directed to a local file, then browse the local file using 'less', 'more', 'pg', 'head', 'tail', whatever. For example (connecting to one of my 3B1 systems using 4.3BSD Tahoe ftp): ksh 3084/3085> ftp thadlabs Connected to thadlabs. 220 thadlabs FTP server (Version 4.162 Tue Nov 1 10:50:37 PST 1988) ready. Name (thadlabs:thad): 331 Password required for thad. Password: 230 User thad logged in. ftp> pwd 251 "/u/thad" is current directory. ftp> dir 200 PORT command okay. 150 Opening data connection for /bin/ls (*.*.*.*,1028) (0 bytes). total 25 drwxr-xr-x 2 thad users 32 Nov 24 1987 Clipboard -rw-r--r-- 1 thad users 135 Sep 12 1989 Environment drwxr-xr-x 63 thad users 1792 Jul 25 12:18 Filecabinet drwxr-xr-x 2 thad users 112 Dec 8 1987 Wastebasket -rw------- 1 thad users 8932 Jun 1 1989 mbox 226 Transfer complete. ftp> cd Filecabinet/WORK 200 CWD command okay. ftp> pwd 251 "/u/thad/Filecabinet/WORK" is current directory. [ Following is the command form you want; my ftp is the BSD 4.3 Tahoe on a 3B1 and it wants the filename to be confirmed (with a RETURN); some ftp programs don't ask for confirmation. ] ftp> ls -lRa C0WABUNGA output to local-file: C0WABUNGA? 200 PORT command okay. 150 Opening data connection for /bin/ls (*.*.*.*,1029) (0 bytes). 226 Transfer complete. ftp> ! ll C0* -rw-r--r-- 1 thad users 51757 Aug 3 00:41 C0WABUNGA ftp> bye 221 Goodbye. ksh 3084/3085> head -20 C0WABUNGA total 1233 drwxr-xr-x 62 thad users 1184 Aug 1 02:48 . drwxr-xr-x 63 thad users 1792 Jul 25 12:18 .. drwxr-xr-x 2 thad users 192 May 20 1989 CB-MISC drwxr-xr-x 2 thad users 112 Jun 2 1989 CB-MISC2 drwxr-xr-x 2 thad users 96 May 20 1989 CB-MISC3 drwxr-xr-x 2 thad users 160 May 20 1989 GNU-emacs-help drwxr-xr-x 2 thad users 144 May 20 1989 HD-fixing drwxr-xr-x 2 thad users 160 Jun 18 01:42 INCOMING drwxr-xr-x 4 thad users 192 Nov 7 1989 StarLAN drwxr-xr-x 2 thad users 160 Nov 16 1989 Voice_Power drwxr-xr-x 2 thad users 208 May 20 1989 accounting drwxr-xr-x 2 thad users 208 Jan 4 1990 alloca drwxr-xr-x 2 thad users 448 Dec 31 1989 at-batch drwxr-xr-x 2 thad users 176 Jun 29 1989 chs2blk drwxr-xr-x 2 thad users 144 Oct 15 1989 cpio-pax-tar drwxr-xr-x 2 thad users 464 Jun 3 1989 diff drwxr-xr-x 2 thad users 80 May 20 1989 dirent drwxr-xr-x 2 thad users 304 Jul 22 00:55 disasm-1v20 drwxr-xr-x 2 thad users 320 Jul 22 00:55 disasm-1v22 ksh 3084/3085> rm C0WABUNGA ksh 3084/3085> Thad Floryan [ thad@cup.portal.com (OR) ..!sun!portal!cup.portal.com!thad ]