I would like to get the size of a remote directory using SFTP.
Locally I would run du -sh
, but my OpenSSH sftp
client does not have that option.
I would like to point out that I do not have SSH shell access, so any connections with ssh user@server
will be dropped.
Any ideas? Maybe scripting a solution? For example I could imagine listing all remote files using ls -l
in my SFTP session, but I would have to parse the output and traverse through all subdirectories. I am also open to using a different client than OpenSSH.
Both server and client are running Linux.