How to check free space in a FTP Server?

2019-05-19 03:03发布

问题:

I am trying to develop a GUI app, that displays freespace of FTP server. FTP Server can be linux or windows. Is there any common method. (other than scheduled job)

In Windows FTP IIS, there is an option to get space as part of LIST command. In ubuntu found one method using cron jobs. Is there any other method than using cron jobs??

回答1:

There's no generic way to check a disk space on FTP server. I'm afraid that majority of FTP servers do not provide this information at all.

Different FTP servers supports different proprietary features to provide disk space:

  • There's a draft for AVBL command, which is supported for example by Serv-U FTP server:

  • IIS can optionally include free space information in a directory listing, as you already know:
    Is it possible to determine the amount of free space on a remote FTP server without using scripts?

  • WS_FTP has XQUOTA command:

    XQUOTA
    213-File and disk usage
        File count: 3
        File limit: 10000
        Disk usage: 1532791
        Disk limit: 2048000
    213 File and disk usage end
    

My GUI FTP client, WinSCP, supports all these ways to check the space available. So you can test it against your server to see, what, if any, commands and syntax it would use against your servers.



标签: ftp