Operating System - HP-UX
1819804 Members
2990 Online
109607 Solutions
New Discussion юеВ

FTP LIST command and dot files

 
Normand_1
New Member

FTP LIST command and dot files

I am issuing a FTP LIST command from a FTP client (via a FTP active connection).
The problem is that the returned list of files does not contain the files starting by a dot
character.
If I am using a FTP client in passive mode,
and issuing the ls -lsa command, then all
the files are listed.

Why does the FTP server does not report the filenames starting by a dot character on the received LIST command ?

---
Michel
3 REPLIES 3
Tom Geudens
Honored Contributor

Re: FTP LIST command and dot files

Hi,
This may be completely besides the point, but it may have something to do with the user you are connecting to. No user (other than root) gets to see the dot-files (unless he specifically asks for them ... as you did in your passive connection) ...

Hope this helps,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
harry d brown jr
Honored Contributor

Re: FTP LIST command and dot files

Michel,

I think you are talking about file names, like ".profile", ".kshrc" and such, correct? These files don't show up normally when you issue an "ls", therefore an FTP LIST won't show them either. It's just a feature of unix, and this is because when processing files in a directory, you normally don't want "special" files to be processed, thus the use of "special names" starting with a period (.).

live free or die
harry
Live Free or Die
Ceesjan van Hattum
Esteemed Contributor

Re: FTP LIST command and dot files

ftp ls (or dir) works just like the normal ls on unix as defined for this specific user.
If logged by telnet, the ls command will give the same output as in ftp.
If you would like to have an output as in 'ls -l', then you'll need to change the behaviour by setting an alias:
alias ls='ls -l'
If you put this command in your .profile, then each ftp session logging in as this user will have the same behaviour.
Succes, Ceesjan