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'm trying list all files (recursively) with their full path name (including name of the file) followed by their size in bytes. I do not need any '.', '..' entries.

I dont think anything in the 'ls' options would work here.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Try this:

find full_path_to_your_directory -type f -printf '%p %s\n'
share|improve this answer
1  
In case it wasn't obvious, you'll need to put in the full path to "your_directory" there, not just the relative path, or the output will have relative paths too. –  frabjous Oct 3 '10 at 23:52
    
works great! thanks! –  siliconpi Oct 4 '10 at 7:40

Since you tagged your question [unix] and not [linux], you may not have GNU find and its -printf option. In that case, this command may work for you:

find /dir/to/start/from -type f -ls
share|improve this answer
    
whoops sorry - its actually redhat linux that i'm using...! –  siliconpi Oct 4 '10 at 7:40

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.