Space utilization for group of files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Space utilization for group of files
# 1  
Old 03-29-2012
Space utilization for group of files

Hi

Is there an easy was to list a group of file (*.txt) and report how much disk space they are using in total?

Cheers
# 2  
Old 03-29-2012
You can use :
Code:
du -sk *.txt | awk ' { sum+=$1 } END { print sum } '

# 3  
Old 03-29-2012
Use du - most implementations provide a 'total' option, but you'll need to check the man page on your system.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Replace Stub Values In One Group Of Files With Actual Values From Another Group Of Files

I have two directories of files (new-config-files and old-config-files): new-config-files/this-db/config.inc.php new-config-files/that-db/config.inc.php new-config-files/old-db/config.inc.php new-config-files/new-db/config.inc.php new-config-files/random-database/config.inc.php etc. ... (4 Replies)
Discussion started by: spacegoose
4 Replies

2. Shell Programming and Scripting

Disk Space Utilization in HTML format working in one environment and not working on the other

Hi Team, I have written the shell script which returns the result of the disk space filesystems which has crossed the threshold limit in HTML Format. Below mentioned is the script which worked perfectly on QA system. df -h | awk -v host=`hostname` ' BEGIN { print "<table border="4"... (13 Replies)
Discussion started by: Harihsun
13 Replies

3. Red Hat

CPU Utilization and Memory Utilization of Services and Applications

Hi, i am new to linux/RHEL 6.0 and i have two questions. 1) How to get the CPU utilization and Memory Utilization of all Services running currently? 2) How to get the CPU utilization and Memory Utilization of all Applications running currently? Please help me to find the script. ... (2 Replies)
Discussion started by: nossam
2 Replies

4. Shell Programming and Scripting

Need simpler way to find all my disk space utilization using df -h

Hi All, I am using SSH Tectia terminal to get the disk space utilization of a particular folder /opt/logs in all the servers one by one using the command df -h and looking through the list of folders manually to get /opt/logs folder disk space used percentage . The problem here is , it... (2 Replies)
Discussion started by: aakhan2011
2 Replies

5. Shell Programming and Scripting

getting space utilization from a location

Hi All, I am writing a script in which it should get the space utilization from a specified location on different servers. Logic that i used is, it reads server name from a file (each server name on new line) and that is given as an input to whiile loop. cat server.list server1 server2... (2 Replies)
Discussion started by: pkbond
2 Replies

6. Shell Programming and Scripting

disk space utilization script

Hi, I wrote the following script for monitoring disk space and inform the concerned team accordingly. But script gives me below error syntax error at line 70 : `<' unmatched #!/bin/ksh . /home/scr/.profile . /home/scr/.infa_env # Get the list of Integration Services ... (6 Replies)
Discussion started by: svajhala
6 Replies

7. AIX

Eliminating paging space and interpreting memory utilization

I just want to inquire on one of our DB Servers. Currently, we are running on 26GB of memory and 6 CPUs. Though our memory is 70-80 utilized, I can see some paging of around 8-10%. Is there any effective way we can lessen/eliminate paging? Here is our current VMO Settings: vmo: ... (1 Reply)
Discussion started by: depam
1 Replies

8. Shell Programming and Scripting

Check space utilization in recursive mode

Hi friends, I have the following query.. Suppose I have the parent directory as /home/suresh/Jobs and assume there are many child ub-directories created within this parent directory I would like to fire a command which will give me the space utilization within each of the child... (1 Reply)
Discussion started by: sureshg_sampat
1 Replies

9. UNIX for Dummies Questions & Answers

Space Utilization

Hi All, I have executed the "df -h" command to identify the space utilization and I noticed that i have utilized more than 60% of the alloted resources. Is there any command to check what are the files occupying/eating the 60% of the resources (for my id)?? If i know the files and their location... (2 Replies)
Discussion started by: Meem
2 Replies

10. AIX

volume group space addition after LUN creation

Hi, I was told that 300GB of LUN has been allocated to my server by the SAN group. apart from rootvg i have 2 volume groups(oracle) for which i need to add space as follows: oradbvg 250GB to be added oralvg 50GB what are the steps that i should follow after iam being told that LUN has been... (4 Replies)
Discussion started by: karthikosu
4 Replies
Login or Register to Ask a Question