Subject: LIST/NLST questions

From: "Scott Parmenter" <[email-masked]>
Date: Tue, 27 Oct 1998 18:25:36 -0800

Hi, all,

What is the difference between LIST and NLST?  I believe one corresponds
to /bin/ls usage, and the other gives an internally generated directory
listing, but I'm not sure which is which.

Also, how much effort would be involved in forcing both NLST and LIST to
return the same file information?  For example, just give file names
regardless of which command was issued by the ftp client.  Would this
cause any problems on the client-side?

Thanks,
Scott

---

From: Simon Bennett <[email-masked]>
Date: Wed, 28 Oct 1998 15:55:09 +1100

> listing, but I'm not sure which is which.

The way it's supposed to be is:

LIST - this is typically  what uses "external" ls - to generate an "ls
-l" listing - which of course is platform specific (you're going to get
different information from an NT system to a UN*X) - it's suppose to
generate output for "humans" - who can interpret the platform specific
information.

NLST - or "name list" is supposed to generate a bare bones listing of
just the names of the files in the directory - it's directed a a program
(typically an FTP client) that (for example) - wants to implement a
"mget" type feature.

If memory serves I think Bero-FTPD will parse generate a LIST if it's
passed a "NLST -l" - which is a case of doing what the user intended as
opposed to what she asked for. 
 
> return the same file information?

Not much really.  Simple source patch or a shell script for your
external ls that ignores the -l.

> For example, just give file names

Unlikely if you made both act like NLST is supposed to.  Should be fine.

Other way around might cause grief for multiple file operations.