Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a problem with "du -hs" showing a wrong file size for about 1 minute. for example: downloading 200MB file, and checking with du right after the download has been completed will show 1.1MB. than after about 60 seconds it will show the correct size.

share|improve this question
1  
That sounds weird.. Unless the machine is still committing to disk when you 1st run du. Try running "sync;du -sh" ? It might be that if you're downloading via a browser, it saves it to a temp file first of all then when completed, copies it to the correctly named file? Try doing an "ls -lrt" in the download directory to see which files are updated last (most recent at the end of the listing). –  FreudianSlip Jan 20 '13 at 8:38
    
sync;du -sh helped, thanks! won't it hurt server performance? –  teslasimus Jan 20 '13 at 8:47
    
negligibly - the server will do a sync every X seconds anyway. –  FreudianSlip Jan 21 '13 at 16:25
    
If this solves your problem, post it as an answer. –  Scott Jan 22 '13 at 2:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.