![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to List out the Files based on the file Size...? | psiva_arul | Shell Programming and Scripting | 6 | 04-08-2008 11:06 PM |
| command to list file size | rgordon | HP-UX | 3 | 12-05-2007 05:43 AM |
| command to find out total size of a specific file size (spread over the server) | abhinov | SUN Solaris | 3 | 08-08-2007 07:48 AM |
| List File size | komputersman | UNIX for Dummies Questions & Answers | 10 | 06-13-2007 05:39 PM |
| total size taken by directory | jyoti | HP-UX | 2 | 04-12-2006 05:52 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Total file size of a subset list
Hello!
I'm trying to find out the total file size of a subset list in a directory. For example, I do not need to know the total file size of all the files in a directory, but I need to know what the total size is of say, "ls -l *FEB08*" in a directory. Is there any easy way of doing this? Thank you, |
|
||||
|
Total file size of a subset list
Thank you! Yes, that worked very well. But now I'm curious about a couple of things (i.e., please explain a little of how it works):
Instead of bothering you with even more questions than, I looked awk in google and found gnu.org and searched on +=. It gave me this: ls -l files | awk '{ x += $5 } END { print "total K-bytes: " (x + 1023)/1024 }' 1. Should I be using the (x + 1023)/1024 stated above (I'm wondering why they have that)? 2. I have GB of files, is there a different number I can use to get GB or do I just add 2 zero's? 3. Why %4.2f\n (what does that mean)? Thanks! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|