Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an FTP Server where a large number of files/folders are stored.

I would like to see how much is stored in each of the folders (including it's subfolders). Is there a way to do this? I.e. get a listing of all folders and theirs sizes on the FTP Server.

Ideally on Linux, Windows also possible.

share|improve this question

1 Answer 1

The du utility will do what you want.

share|improve this answer
    
I can only access the data via FTP on the Server, but "du only runs locally, so sorry, no, that does not do what I want in my case. –  centic Sep 21 '12 at 5:44
    
Then you'll need a script that can recursively walk the tree, starting up an FTP session, cd'ing into a directory, doing an ls or dir, parsing the results to find any subdirectories, then repeating. –  Nicole Hamilton Sep 22 '12 at 1:22
    
hmm, sure I can do that, but that's what I was trying to avoid, I thought there must be some application or tool which can do that without implementing it myself... –  centic Sep 23 '12 at 16:45
    
I had a similar problem when I wanted to move one of my sites from a hosting service onto my own machine and I wanted to get the timestamps as well. If you're stuck with the FTP interface, you're stuck with just the commands and the behaviors they give you. You get a dir and an ls but they're both brain-dead and don't recurse. I ended up writing a script (but it's nowhere near publishable quality.) –  Nicole Hamilton Sep 23 '12 at 16:59
    
if you use du command with lftp it just does what you need. –  redclover Jan 27 at 3:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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