The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
counts sbr262 UNIX for Dummies Questions & Answers 3 04-28-2008 05:32 AM
command to find out total size of a specific file size (spread over the server) abhinov SUN Solaris 3 08-08-2007 03:48 AM
Group by columns and get the counts sumeet UNIX for Advanced & Expert Users 3 02-13-2007 02:28 AM
counts k@ssidy UNIX for Dummies Questions & Answers 11 06-09-2005 08:49 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-30-2007
Registered User
 

Join Date: Oct 2007
Posts: 50
Stumble this Post!
file size counts??

Hello experts,

I do -

$ ls -lhtr logs2007*

Is it possible that i can get the results of-

totals size in MB/KB for ALL "logs2007*"

note: in the same directory I have "logs2006*" & "logs2007*" files.

Last edited by thepurple; 12-30-2007 at 01:04 AM.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-30-2007
Registered User
 

Join Date: Sep 2006
Posts: 1,541
Stumble this Post!
Code:
# du -sk 2007* | awk '{t+=$1} END{ print t}'
Use the search function next time.
Reply With Quote
  #3 (permalink)  
Old 12-30-2007
Registered User
 

Join Date: Oct 2007
Posts: 50
Stumble this Post!
purple

Quote:
Originally Posted by ghostdog74 View Post
Use the search function next time.
could u clarify what do u mean by above??
Reply With Quote
  #4 (permalink)  
Old 12-30-2007
Registered User
 

Join Date: Sep 2006
Posts: 1,541
Stumble this Post!
there's a search function in this forum. Use that to search for what you want. counting file sizes has been posted and answered many times. :-)
Reply With Quote
  #5 (permalink)  
Old 12-30-2007
Registered User
 

Join Date: Oct 2007
Posts: 50
Stumble this Post!
I will...Many thanks buddy. Just to know- can u tell me how the above code works?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:28 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0