Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to find out the directory size of a folder to determine if a user has rights to keep writing to the folder (i.e. they are within the given limits I've imposed).

I'm doing:

du -sb <path>

which is fine and all, but the problem is if whilst this is being executed, another user deletes something from that directory then du chucks a bunch of cannot find file errors to the console.

Is there any way of handling this or at least stopping du chucking errors?

Thanks

share|improve this question
    
du -sb 2>/dev/null ? –  Matthew Ife Oct 24 '13 at 19:06
    
yes that will work I think :) –  Tada.wav Oct 24 '13 at 19:10

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.