-1

I would like to know how much data is in a remote folder (recursively) under ftp (from the command line). Wondering how to do that. Something like:

sizeof -r ftp://domain.com/foo/bar/*
0

if you use lftp, you can use:

echo "du -hs ." | lftp domain.com/foo/bar/ 2>&1

This will print the current directory's disk size including all subdirectories, in human-readable format (-h) and omitting output lines for subdirectories (-s). stderr output is rerouted to stdout with 2>&1 so that it is included in the output.

Source

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.