Re: howto recreate /dev/null ?
On Fri, Sep 01, 2000 at 09:09:21PM +0200, Sven Burgener wrote:
> On Thu, Aug 31, 2000 at 11:35:46PM -0500, Will Trillich wrote:
> > what's redirecting to '/dev/null' good for? here's
> > an example. if you're not running 'fetchmail' as its
> > own background daemon, to yank your email from various
> > servers, you can have cron do it for you. the thing is,
> > you get lots of tripe in the output. it tells you all
> > about how each message contains X octets, and how it's
> > downloading the data... none of which you really need.
> >
> > 15 * * * * fetchmail > /dev/null 2>&1
>
> Not to be mean or anything, but FYI fetchmail can be made
> silent with "-s":
> -s, --silent work silently
>
> But then again, you probably already knew that. :)
you're half right. i suspected, but hadn't explored the
docs to find out. is there a performance penalty comparing
these two
some_verbose_command > /dev/null
versus
some_verbose_command --silent_running
> > you can also use /dev/null for STDIN as in
> > somecommand < /dev/null
> > in which case for ANY 'read' that the command does
> > from STDIN, it'll get EOF forever.
>
> Yup, just like the following line demonstrates nicely: :)
>
> > Unsubscribe? mail -s unsubscribe debian-user-request@lists.debian.org \
> > < /dev/null
good eye. i thought about that one just after i hit the
SEND button. (i guess i need a shorter send button.)
Reply to: