DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Unix command

  1. #1
    Join Date
    Jan 2001
    Posts
    138

    Unix command

    In our file system there are archivelogs for a couple of months. I just need to know how much space is occupied by the logs created in the latest two weeks. How do I do that in Solaris? Thanks.

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492
    try this:

    find . -name '*.arc' -mtime -15 -ls \
    awk '{c=c+$7;} END {printf "Space is %s bytes.\n",c;}'
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  3. #3
    Join Date
    May 2002
    Posts
    42
    I'm sure there are better ways but this sould work.

    find . -type f -mtime -15 -ls | awk '{ total += $7} END { print "total is", total}'

Posting Permissions

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


Click Here to Expand Forum to Full Width