Home » Questions » Computers [ Ask a new question ]

Differences between dir and ls FTP Commands

Differences between dir and ls FTP Commands

Hello we have made a little program to upload an .zip file to an FTP server, and when I connect to the FTP server with FileZilla to see everything is ok I can't see the uploaded file.

Asked by: Guest | Views: 211
Total answers/comments: 2
Guest [Entry]

"The difference between dir and ls is that the under the hood the Windows FTP client is sending two different FTP commands.

The dir command sends the LIST FTP command:

Returns information of a file or
directory if specified, else
information of the current working
directory is returned.

The ls command sends the NLIST FTP command:

Returns a list of file names in a
specified directory.

This doesn't really explain the difference in the listing, but I would suggest looking into your FTP server's documentation to investigate why you would see different results for these two commands."
Guest [Entry]

"It may be a permissions oddity, and may be a platform specific issue. Can you tell us what OS and FTP server software is involved (many servers will announce this information as you connect).

If it responds to the command ls -al, could you add that information to your question? And/Or if you can connect the account using SSH what does ls -al return then?

One other thing - does the zip file have a dot as its first character? This is often interpreted as meaning the file should be hidden unless specifically you specify options otherwise."