Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    extracting information from an ls output

    If I run:
    ls -la / > output.out

    I will have the entire directory structure with file name, date, and sizes.

    Is there a way to take the output.out file and add up file space by month? For example I would want it to tell me the total space that all the files on Jan/2005 take up based on last access. So the idea would be to run a script and it creates output like this:

    12/2004 34,322
    01/2005 432,921
    02/2005 2332,120

    I would appreciate and ideas, thanks

  2. #2
    Just use awk.If you're not familiar with it a google search will give
    you introductory tutorials which you can read in 5 minutes
    and then you'll be able to do what you want easily.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts