Find the answer to your Linux question:
Results 1 to 2 of 2
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Posts
    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
    etc...

    I would appreciate and ideas, thanks
    Mark

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Posts
    575
    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
  •