Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

Is it possible to redirect, ie create /dev/null as non-null device, like /dev/console or /dev/stdout? This obviously has to be done before init runs create creates a standard /dev/null. Upstart seems to dislike simple symlink to /dev/stdout.

share|improve this question
Upstart seems to dislike simple symlink Ofcourse it does not ;) Symlinks can be created across filesystems and you do not need a lot of imagination to come up with what happens when a disc is not present when upstart needs it. – Rinzwind Feb 13 '13 at 14:12
@Rinzwind: /dev/stdout is hardly on any other filesystem, but yes, symlink is not the way to go. – Tuminoid Feb 13 '13 at 20:36


/dev/null or the null device is a special file that discards all data written to it (but reports that the write operation succeeded) and provides no data to any process that reads from it

The answer is no: redirecting from /dev/null is impossible since, after /dev/null is done there is nothing left to redirect. You need to alter the program you want to see the messages from to echo these results to a log file before a /dev/null comes into play.

share|improve this answer
Please read the question again. I'm not debugging any jobs. I'm also making it clear any switch needs to be done prior running init (Upstart) which creates /dev/null IF it is not present. – Tuminoid Feb 13 '13 at 20:34
Answer is still no. – Rinzwind Feb 13 '13 at 21:15
Can you revise your answer then to reflect the question, and I'll then accept it (ie. I'm creating /dev/null to whatever I wish, and not trying to fix it after being created as null device.) – Tuminoid Feb 14 '13 at 7:40
i think what R was saying is that if you did do this, it would create a huge security hole and probably be considered, at least at some level, malicious intent, even if it is not intended to be that way, since /dev/null is intended to discard and hide output, and sometimes it is sensitive data that should not be seen, ever... any uppity noseity programmer is going to give you a no. That does not however mean that it is impossible.. just means that it probably would be viewed in a negative light if you did. PS: i know its late but I try to put comments in where they look like they are needed :) – osirisgothra Mar 1 '14 at 12:48

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.