Find the answer to your Linux question:
Results 1 to 4 of 4
I accidently deleted /dev/null How can I put it back? it seems like an empty file with some special permissions....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Jan 2003
    Location
    Cardiff, Wales
    Posts
    478

    re create /dev/null


    I accidently deleted /dev/null

    How can I put it back?
    it seems like an empty file with some special permissions.
    No trees were harmed during the creation of this message. Its made from a blend of elephant tusk and dolphin meat.

  2. #2
    Just Joined!
    Join Date
    Jan 2004
    Posts
    70
    Use the makedev script. try man makedev.

  3. #3
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Use this command:
    Code:
    mknod -m 666 /dev/null c 1 3

  4. #4
    Linux User
    Join Date
    Jan 2003
    Location
    Cardiff, Wales
    Posts
    478

    thanx

    Thanx. I managed to find it on google eventually.

    Well I find out to try "man 4 null" and that told me how to put it back.

    I was setting up a samba server and configuring machine trust accounts which had their home directories set to /dev/null.

    I mispelled one of the usernames so deleted the user. The tick box is on by default to delete the user's home directory. Ooops.

    That is the problem with using the GUI. Default options can be a real pain in the arse. Never mind, all working now.

    Cheers

    Kris
    No trees were harmed during the creation of this message. Its made from a blend of elephant tusk and dolphin meat.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •