Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • I'd rather have stderr also go to ./test.txt instead of being lost, with : sudo du -h --max-depth=1 / </dev/null >>./test.txt 2>&1 Commented Jan 7 at 17:27
  • @OlivierDulac so would I, but I was copying the structure from the question. Nevertheless I've amended the answer Commented Jan 7 at 18:15
  • 1
    Could you explain the design? I mean, if this is by design, what is the use case? Commented Jan 7 at 19:10
  • @terdon I'd love to, but it seems to be a combination of bash and sudo along with stuff like stty [-]tostop. I'll try to nail it down Commented Jan 7 at 19:24