Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

How can I catalog the contents of a filesystem to a CSV file? This is particularly useful for removable media.

I've found a couple links that point in this direction:

Thank you!

share|improve this question
up vote 3 down vote accepted

This creates a CSV file with file name, time stamp and size for all files in /some/folder/ and its subfolders:

find /some/folder -printf '"%P";"%Tc";"%s";\n'

See the documentation for -printf in the manpage for find if you want to use other fields.

Note that it doesn't work for file names containing " characters.

share|improve this answer
Florian, I'm getting a > prompt when I run this command and I have to Ctrl+c to get out of it. What am I doing wrong? – Sean Fenton Aug 23 '13 at 11:25
Thanks. There was a ' missing at the end. Fixed it. – Florian Diesch Aug 23 '13 at 12:48
Thanks, Florian! Yet another reason to learn regexp. – Sean Fenton Aug 28 '13 at 0:55

Your Answer


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.