-1

I ran du on a particular machine and two instances of failure:

enter image description here

Since I ran as superuser I do understand how I can get denied. Second problem was with the proc tree:

enter image description here

I kind of get the gist of why this, the proc stuff are not actually files, but shouldn't du know that and skip them?

mkomarinski
  • 608
  • 3
  • 12
Tyler Durden
  • 5,411
  • 16
  • 57
  • 96
  • 2
    Please paste the text instead of screenshot when possible. – Mostafa Ahangarha Mar 24 '16 at 17:56
  • 2
    Your /proc messages aren't errors because they're "not files" but because the files were gone between du scanning the directory and recursing into it (processes 28073, 28075, 2808, and 29692 all exited in the meantime). – Jeff Schaller Mar 24 '16 at 17:59
  • for the .gvfs part, see http://unix.stackexchange.com/a/77592/117549 – Jeff Schaller Mar 24 '16 at 18:01
  • From the perspective of `du`, `/proc` is a filesystem like any other and it'll try to traverse the path as best it can. You'd need to exclude it with something like `du --exclude=/proc` – mkomarinski Mar 24 '16 at 18:02

1 Answers1

1

For the second part of your question, du cannot access the specified files because the process that owned them has exited prior to those files being stat()ed. du first enumerates the files it needs to look at, then goes back and calls stat() on each of the items in it's enumerated list, allowing a race-condition-like effect where files are removed after being enumerated but before being stat()ed.

John
  • 16,759
  • 1
  • 34
  • 43