In a different question I discovered that "There are a few dirs which you should not run du against", and that "The output should tell you what has been completed and what the next is causing the hang". However, it's not possible to determine what "the next" would be unless you know the order in which du
checks directories. What is that order? It doesn't appear to be based on name, last modification time, last access time, or creation time (confirmed by checking the output of du --max-depth=1 2>/dev/null
against ls --time=[ctime/atime/birth]
), and it's not describe in man du
or here.
(I recognize that this information isn't necessary in order to resolve my initial problem - I can just try du
against sets of directories until I find the problematic ones. But I'm curious!)
(Apologies for the overly-broad tag, but there is no specific du
tag, and it's not possible to submit a question without a tag)
ls -f
would likely also display the directory entries in this unsorted order. – Kusalananda Jan 13 '23 at 06:28