Print summary or the total disk usage of conf file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Print summary or the total disk usage of conf file
# 1  
Old 01-05-2012
Print summary or the total disk usage of conf file

hey i want to print the summary or the total disk usage of the configuration files that are in the /etc directory printed in human-readable format.

i think i got somewhere right as am using wc *.conf commands but i am unsure how to use to put it in human-readable format with the wc command.

hope someone can help
# 2  
Old 01-05-2012
wc measures bytes, words, or lines. If that's not what you want, try ls -lh
# 3  
Old 01-05-2012
Hi,
you can use the command du -h filename ==> for single file


for the files in a directory
Code:
$ du -h New_Perl/ 

8.0K    New_Perl/basic_testing_perl
1.0K    New_Perl/shell
20K     New_Perl/xmlparsing/examples
30K     New_Perl/xmlparsing
3.1M    New_Perl/

thanks,
venkat

Last edited by Scott; 01-06-2012 at 04:25 PM.. Reason: Code tags
# 4  
Old 01-05-2012
if i wanted to do it by certain file type would the command be du -h *.conf?
# 5  
Old 01-05-2012
For the summary of files in a directory you can use du -sh /etc

ex:-
Code:
$ du -hs New_Perl/
3.1M    New_Perl/


Last edited by Scott; 01-06-2012 at 04:25 PM.. Reason: Code tags
# 6  
Old 01-05-2012
That won't be the sum of the file sizes, though. That will be disk used. As in, sum of sector sizes, which may be larger or smaller than the actual file length depending on how it's stored.
# 7  
Old 01-05-2012
i need summary of total disk usage of the .conf file type. i done du -h *.conf and that just gives me file size for every file
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Total CPU usage on a server

hi, i am using solaris server. I want to find the total CPU usage on a server. Top command will give that result, but here that command is not working. So anyone can help me to find the total CPU usage. (2 Replies)
Discussion started by: Arasu123
2 Replies

2. UNIX for Dummies Questions & Answers

Total cpu usage in percent(%)

How to determine the total percentage cpu usage of a server having 4 cpu cores(quad core)? (3 Replies)
Discussion started by: proactiveaditya
3 Replies

3. UNIX for Advanced & Expert Users

How to check total disk usage ?

Hi.. What is the command to check total disk usage for specific directory in MG/GB/Byte ? As example i want to check disk usage for directory pproc ? Please help me.. Thank you, Baharin (3 Replies)
Discussion started by: bh_hensem
3 Replies

4. Shell Programming and Scripting

how to add up a total in a summary report?

Hi all i got a script up but i cant add up the summary report.. keep having synax error . mind helping me to take a look and tell me what went wrong.. i know is a bit long but i hope someone can hep me with it. thanks the error message come up when i try to run the sumary report.. i guess... (16 Replies)
Discussion started by: xiaojesus
16 Replies

5. Shell Programming and Scripting

Total usage memory by user

Hi, When running top on linux redhat machine , i see that i have 16gb of memory in my machine and about 14.5gb of memory are in use: Mem: 16395780k total, 14970960k used, 1424820k free, 370264k buffers Swap: 4192956k total, 25824k used, 4167132k free, 12029400k cached How can i... (3 Replies)
Discussion started by: yoavbe
3 Replies

6. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

7. Shell Programming and Scripting

Detailed disk usage versus age summary

Hi, I'm posting my question here as I fele that what I am about to try to do must have been done already, and I don't want to re-invent the wheel. I have recently become responsible for monitoring disk space usage for a large file system. I would like to geenrate reports that will summise... (8 Replies)
Discussion started by: littleIdiot
8 Replies

8. UNIX for Dummies Questions & Answers

Disk Usage in GB and Unix command to find the biggest file/folder

Hi All, Please help me out 1) Command to find the disk usage in GB. I know that du -k will give in kilobites. 2) How to find the Biggest file/folder in a given set of files/folders. Thanks in advance Regards, Manas (8 Replies)
Discussion started by: manas6
8 Replies

9. HP-UX

How to summary one command's cpu usage?

I want to record one application's(like oracle etc...) CPU usage summary. I can filter by "ps". But how to sum? Thanks (1 Reply)
Discussion started by: jiarong.lu
1 Replies

10. Filesystems, Disks and Memory

How do you display summary of disk usage?

I am trying to create a command string that makes use of the du or df utilities to show block count in kilobytes (1024 bytes) instead of multiples of 512 bytes, any suggestions? Thanks..... (3 Replies)
Discussion started by: klannon
3 Replies
Login or Register to Ask a Question