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'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
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

You must log in to answer this question.

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