Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


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

Your Answer


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

Browse other questions tagged or ask your own question.