Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jul 2001 11:02:32 -0600 (CST)
From:      Ryan Thompson <ryan@sasknow.com>
To:        Klaus Steden <klaus@compt.com>
Cc:        Child <child@child.net.au>, questions@FreeBSD.ORG
Subject:   Re: deleted /dev/null by mistake
Message-ID:  <Pine.BSF.4.21.0107161100120.61534-100000@ren.sasknow.com>
In-Reply-To: <20010715232550.J73359@cthulu.compt.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Klaus Steden wrote to Child:

> > hi all
> > one of my shell scripts did an rm -f /dev/null
> > 
> (cd /dev && sh MAKEDEV) should do it (as root),
> 
> or by hand ...
> 
> mknod /dev/null c 2 2 
> 

Remember to remove (rm) /dev/null immediately (i.e., in the same command)
before you do that if you are doing this in multi-user mode, because, on
most servers, stuff gets sent to /dev/null all the time, and if it was
deleted, you'll have a regular file with a bunch of junk in it, and mknod
won't attempt to unlink it before creating the new device node.

- Ryan

> Klaus
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 

-- 
  Ryan Thompson <ryan@sasknow.com>
  Network Administrator, Accounts

  SaskNow Technologies - http://www.sasknow.com
  #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2

        Tel: 306-664-3600   Fax: 306-664-1161   Saskatoon
  Toll-Free: 877-727-5669     (877-SASKNOW)     North America


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0107161100120.61534-100000>