Du -sh command taking time to calculate the big size files

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Du -sh command taking time to calculate the big size files
# 8  
Old 07-17-2014
You don't want to check the NFS? Oh, that's much easier.


Code:
du -hs /* -x

The -x prevents it from looking outside the partition it starts in.
# 9  
Old 07-17-2014
Quote:
Originally Posted by Peasant
But if you do a while true do ls -lrt ... it will be slow first time, and fast every other loop iterations.
Sounds like caching behavior. Once it has it, it keeps it a while for faster recall.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

[c] How to calculate size of the file from size of the buffer?

Hi, Can I find size of the file from size of the buffer written? nbECRITS = fwrite(strstr(data->buffer, ";") + 1, sizeof(char), (data->buffsize) - LEN_NOM_FIC, fic_sortie); Thank You :) (1 Reply)
Discussion started by: ezee
1 Replies

2. UNIX for Advanced & Expert Users

command taking lot of time to execute

Hi, I am running the following command, and it tries to delete some dn from ldap, however, it takes lot of time before it finally request LDAP server to delete it. I am trying to find why it is taking lot of time. Could you anyone help me in this regard. I have copies the pstack output, and... (3 Replies)
Discussion started by: john_prince
3 Replies

3. Shell Programming and Scripting

Shell script to calculate the size of files

Dear all, Please help me to write a script that can calculate the size of files. For example: I have a directory which contain thousands of files. I need to know the size of files that their name begin with abc_123 Thank all!! (4 Replies)
Discussion started by: hainguyen1402
4 Replies

4. Shell Programming and Scripting

Calculate age of a file | calculate time difference

Hello, I'm trying to create a shell script (#!/bin/sh) which should tell me the age of a file in minutes... I have a process, which delivers me all 15 minutes a new file and I want to have a monitoring script, which sends me an email, if the present file is older than 20 minutes. To do... (10 Replies)
Discussion started by: worm
10 Replies

5. Solaris

calculate sum size of files by date (arg list too long)

Hi, I wanted a script to find sum of files for a particular date, below is my script ls -lrt *.req | nawk '$6 == "Aug"' | nawk '$7 == "1"'| awk '{sum = sum + $5} END {print sum}' However, i get the error below /usr/bin/ls: arg list too long How do i fix that. Many thanks before. (2 Replies)
Discussion started by: beginningDBA
2 Replies

6. UNIX for Dummies Questions & Answers

gref -f taking long time for big file

grep -f taking long time to compare for big files, any alternate for fast check I am using grep -f file1 file2 to check - to ckeck dups/common rows prsents. But my files contains file1 contains 5gb and file 2 contains 50 mb and its taking such a long time to compare the files. Do we have any... (10 Replies)
Discussion started by: gkskumar
10 Replies

7. Shell Programming and Scripting

Help in extracting multiple files and taking average at same time

Hi, I have 20 files which have respective 50 lines with different values. I would like to process each line of the 50 lines in these 20 files one at a time and do an average of 3rd field ($3) of these 20 files. This will be output to an output file. Instead of using join to generate whole... (8 Replies)
Discussion started by: ahjiefreak
8 Replies

8. Shell Programming and Scripting

bash script working for small size files but not for big size files.

Hi, I have one file stat. Stat file contents are as follows: for example. H50768020040913,00260100,507680,13,0000000643,0000000643,00000,0000 H50769520040808,00260100,507695,13,0000000000,0000000000,00000,0000 H50770620040611,00260100,507706,13,0000000000,0000000000,00000,0000 Now i... (1 Reply)
Discussion started by: davidpreml
1 Replies

9. Shell Programming and Scripting

calculate size of some files

Hi, 1-I want to calculate the size of all files which are generated during last month in a directory. How can I do that ? Of cours, I find them by : $ls -l | grep jun but how to calculate the sum of their size ? 2- the same but for all files generated last month and before that. many thanks... (11 Replies)
Discussion started by: big123456
11 Replies
Login or Register to Ask a Question