SFTP: a new command to get filesystem size/free space

Thue Janus Kristensen thuejk at gmail.com
Mon Feb 19 05:48:20 EST 2007


I am using sshfs with FUSE to mount a remote directory over ssh/sftp (on linux).

It would be nice if df could be able to show the total size/free space
of the mounted directory.

I am aware that returning size/free space would have some limitations.
For example, if a subdir of the mounted directory has another
filesystem mounted on the remote server, this can not be represented
simply.

However, I still think that a simple implementation could be useful.
My idea is to simply return the total size and free space of the
current working directory.

Would you accept patches implementing this?

Please CC me, I am not on this list.

Regards, Thue

PS: does the openssh sftp implementation conform to
http://www.openssh.org/txt/draft-ietf-secsh-filexfer-02.txt ?  If not,
is the protocol described elsewhere?


More information about the openssh-unix-dev mailing list