Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 – Gilles Quenot Feb 20 '13 at 17:06

A basic aproach :

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .