| Summary: | Description of ls and nlist wrong in man page for ftp | ||
|---|---|---|---|
| Product: | Documentation | Reporter: | inwap <inwap> |
| Component: | Books & Articles | Assignee: | ben <ben> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
inwap
1999-12-10 22:20:01 UTC
> 2) Change the docs to show that 'ls' is different from 'nlist'. > > Update the man page, so that the paragraph on 'dir' includes > a statement how 'dir' differs from 'nlist'. I'd rather the other way around, but I don't feel strongly either way. It already explains that 'dir' returns system-dependent information. How about adding something like this to the 'nlist' description: Note that this command only returns the filenames in the remote directory. If you wish to see more information about the files (often size, modification time, and so on) use the dir command instead. Perhaps something could be added to the 'dir' description too: If you want a plain list of files, with no extra information, use the nlist command instead. ok? > Replace the paragraph on > 'ls' with "ls [remote-directory [local-file]]\nA synonym for dir." > Move the old description of 'ls' to 'nlist'. That's easy... > Make it clear that, according to the RFC, this command returns > a list of files on the remote machine, explictly excluding the > names of any subdirectories in the remote directory. (The > wu-ftpd-2.6.0 server enforces this.) What do you mean by "this command"? The "nlist" client command? The NLST server command? Either way, I don't see subdirectories excluded: ftp> ls ---> PORT 192,168,91,33,192,13 200 PORT command successful. ---> LIST 150 Opening ASCII mode data connection for /bin/ls. total 12 d--x--x--x 2 root wheel 512 Apr 5 19:14 bin d--x--x--x 2 root wheel 512 Apr 5 19:18 etc drwxrwx-wt 2 root wheel 512 Apr 5 19:13 incoming drwxr-xr-x 4 root wheel 512 Aug 11 1999 local drwxr-xr-x 39 root bin 1024 Jul 10 01:34 packages drwxr-xr-x 5 root wheel 512 Jul 1 20:38 pub 226 Transfer complete. ftp> dir ---> PORT 192,168,91,33,192,14 200 PORT command successful. ---> LIST 150 Opening ASCII mode data connection for /bin/ls. total 12 d--x--x--x 2 root wheel 512 Apr 5 19:14 bin d--x--x--x 2 root wheel 512 Apr 5 19:18 etc drwxrwx-wt 2 root wheel 512 Apr 5 19:13 incoming drwxr-xr-x 4 root wheel 512 Aug 11 1999 local drwxr-xr-x 39 root bin 1024 Jul 10 01:34 packages drwxr-xr-x 5 root wheel 512 Jul 1 20:38 pub 226 Transfer complete. ftp> nlist ---> PORT 192,168,91,33,192,15 200 PORT command successful. ---> NLST 150 Opening ASCII mode data connection for file list. bin etc incoming local packages pub 226 Transfer complete. Am I misunderstanding something? The server in question is running wu-ftpd-2.6.0. Could you explain what should be happening a bit better? thanks, -- Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D Responsible Changed From-To: freebsd-doc->ben I'm looking at this. State Changed From-To: open->feedback I'm waiting for a reply from the submitter to clarify one issue regarding this PR. >> Make it clear that, according to the RFC, this command returns >> a list of files on the remote machine, explictly excluding the >> names of any subdirectories in the remote directory. (The >> wu-ftpd-2.6.0 server enforces this.) Unless I get a clarification of this point, I'll be committing this patch shortly which addresses the main problem (that ls is not the same as nlist, but is the same as dir). Index: ftp.1 =================================================================== RCS file: /usr/cvs/src/usr.bin/ftp/ftp.1,v retrieving revision 1.16 diff -u -r1.16 ftp.1 --- ftp.1 2000/06/12 18:30:15 1.16 +++ ftp.1 2000/07/11 01:03:01 @@ -297,6 +297,11 @@ is .Sq Fl , the output is sent to the terminal. +.Pp +As this command provides extra information which is system-dependent, +you should use the +.Ic nlist +command instead if you only want a plain list of files. .It Ic disconnect A synonym for .Ic close . @@ -419,22 +424,8 @@ .It Ic lpwd Print the working directory on the local machine. .It Ic \&ls Op Ar remote-directory Op Ar local-file -Print a list of the files in a -directory on the remote machine. -If -.Ar remote-directory -is left unspecified, the current working directory is used. -If interactive prompting is on, -.Nm -will prompt the user to verify that the last argument is indeed the -target local file for receiving -.Ic ls -output. -If no local file is specified, or if -.Ar local-file -is -.Fl , -the output is sent to the terminal. +A synonym for +.Ic dir . .It Ic macdef Ar macro-name Define a macro. Subsequent lines are stored as the macro @@ -543,8 +534,29 @@ Otherwise, this command is identical to .Ar get . .It Ic nlist Op Ar remote-directory Op Ar local-file -A synonym for -.Ic ls . +Print a list of the files in a +directory on the remote machine. +If +.Ar remote-directory +is left unspecified, the current working directory is used. +If interactive prompting is on, +.Nm +will prompt the user to verify that the last argument is indeed the +target local file for receiving +.Ic ls +output. +If no local file is specified, or if +.Ar local-file +is +.Fl , +the output is sent to the terminal. +.Pp +Note that this command only returns the filenames in the remote +directory. If you wish to see more information about the files (often +size, modification time, and so on), +you should use the +.Ic dir +command instead. .It Ic nmap Op Ar inpattern outpattern Set or unset the filename mapping mechanism. If no arguments are specified, the filename mapping mechanism is unset. -- Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D State Changed From-To: feedback->closed Turns out the submitter was mistaken about the point I wanted to clarify. The other changed have been committed. |