#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0

    DIR or LS not returning all files in directory


    There is a FTP server that we are working with, that when you perform the DIR or LS command it only returns a subset of the files in the directory. These are the commands we have tried:

    dir
    dir *
    dir *.*
    ls
    ls *
    ls *.*

    There are other files in the directory, but these are ONLY listed if you specifically LS or DIR with the filename or extension, such as:

    ls filename.ext
    ls *.ext

    Are there any other FTP commands that could provide a full listing?

    If not, what could be preventing the listing of all files? Is it a file or FTP attribute of those files? Security setting? Is this common?

    Thanks ahead of time!
  2. #2
  3. They're coming to take me away

    Join Date
    Jan 2005
    Location
    Florida
    Posts
    5,105
    Rep Power
    5049
    What attributes are assigned to the files not being displayed? In other words, are they hidden files? If so, they won't be displayed during a normal "dir" or "ls" unless certain parameters are included.
    "I don't need to get a life. I'm a gamer. I have lots of lives!"
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0
    Good question...I am not even sure how to check on a hidden attribute? Is there a FTP file properties command or something to do that?
  6. #4
  7. They're coming to take me away

    Join Date
    Jan 2005
    Location
    Florida
    Posts
    5,105
    Rep Power
    5049
    Originally Posted by netmatt
    Good question...I am not even sure how to check on a hidden attribute? Is there a FTP file properties command or something to do that?
    Try adding the -a option:

    ls -a

    What OS is the FTP server running off of? What are you using to FTP into the server? (Browser such as IE or FF, or a client like FileZilla, WS-FTP, etc...)
    "I don't need to get a life. I'm a gamer. I have lots of lives!"
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0
    The FTP server is actually running on a robot controller in a factory. I am not sure of the OS. We are using the PERL NET::FTP libraries to access the files, but also just Windows XP command line FTP CLient for testing.

    I'll have them do the ls -a or -la on those files and see if they have different attributes than the ones that do show up.

    Thanks

IMN logo majestic logo threadwatch logo seochat tools logo