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 need to recursively retreive the file/directory structure of an FTP server, getting only file names (without payload). Can you help me how to do this (curl, wget, ...)? The result should be the directory tree with all files with 0 size, but also a text file with file/dir list can be good. I tried to use the .listing generated by wget but it's too much verbose (i need only file name with full path) Thanks so much.

share|improve this question
    
Better gives sample inputs/outputs –  sputnick Feb 20 '13 at 17:06
add comment

1 Answer

A basic aproach :

lftp -u user,passwd domain.tld -e 'nlist *; quit' | awk '$5 == 0'
share|improve this answer
add comment

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.