how to recovry /dev/null - Linux

This is a discussion on how to recovry /dev/null - Linux ; hi, i made a mistake a seconds ago. i delete /dev/null, now,i am still in the systerm without reboot. how can i deal with it? is there any way to recovery? exprcting your suggestions...

+ Reply to Thread
Results 1 to 9 of 9

Thread: how to recovry /dev/null

  1. how to recovry /dev/null

    hi, i made a mistake a seconds ago.
    i delete /dev/null,
    now,i am still in the systerm without reboot. how can i deal with it?
    is there any way to recovery?
    exprcting your suggestions

  2. Re: how to recovry /dev/null

    Erfan writes:

    > hi, i made a mistake a seconds ago.
    > i delete /dev/null,
    > now,i am still in the systerm without reboot. how can i deal with it?
    > is there any way to recovery?


    mknod /dev/null c 1 3

    --
    Mns Rullgrd
    mans@mansr.com

  3. Re: how to recovry /dev/null

    On 2月16日, 下午11时36分, Måns Rullgård wrote:
    > Erfan writes:
    > > hi, i made a mistake a seconds ago.
    > > i delete /dev/null,
    > > now,i am still in the systerm without reboot. how can i deal with it?
    > > is there any way to recovery?

    >
    > mknod /dev/null c 1 3
    >
    > --
    > Måns Rullgård
    > m...@mansr.com


    yes,i google it and find a way to solve this:
    1.mknod /dev/null c 2 2
    2. chmod 666 /dev/null
    God bless my carelessness and your kind hearted

  4. Re: how to recovry /dev/null

    Erfan writes:

    > On 2月16日, 下午11时36分, Måns Rullgård wrote:
    >> Erfan writes:
    >> > hi, i made a mistake a seconds ago.
    >> > i delete /dev/null,
    >> > now,i am still in the systerm without reboot. how can i deal with it?
    >> > is there any way to recovery?

    >>
    >> mknod /dev/null c 1 3

    >
    > yes,i google it and find a way to solve this:
    > 1.mknod /dev/null c 2 2
    > 2. chmod 666 /dev/null
    > God bless my carelessness and your kind hearted


    The Documentation/devices.txt and what I've got on my system agree
    with Måns (i.e. 1 3), not with what you found on the web. 2 2 should
    be a psdeudo-tty.

  5. Re: how to recovry /dev/null

    Joe Pfeiffer wrote:
    > Erfan writes:
    >
    >> On 2月16日, 下午11时36分, Måns Rullgård wrote:
    >>> Erfan writes:
    >>>> hi, i made a mistake a seconds ago.
    >>>> i delete /dev/null,
    >>>> now,i am still in the systerm without reboot. how can i deal with it?
    >>>> is there any way to recovery?
    >>> mknod /dev/null c 1 3

    >> yes,i google it and find a way to solve this:
    >> 1.mknod /dev/null c 2 2
    >> 2. chmod 666 /dev/null
    >> God bless my carelessness and your kind hearted

    >
    > The Documentation/devices.txt


    Where is that?

    > and what I've got on my system agree
    > with Måns (i.e. 1 3), not with what you found on the web. 2 2 should
    > be a psdeudo-tty.


    Where is the documentation regarding major and minor device numbers?

  6. Re: how to recovry /dev/null

    Matt writes:

    > Joe Pfeiffer wrote:
    >> Erfan writes:
    >>
    >>> On 2月16日, 下午11时36分, Måns Rullgård wrote:
    >>>> Erfan writes:
    >>>>> hi, i made a mistake a seconds ago.
    >>>>> i delete /dev/null,
    >>>>> now,i am still in the systerm without reboot. how can i deal with it?
    >>>>> is there any way to recovery?
    >>>> mknod /dev/null c 1 3
    >>> yes,i google it and find a way to solve this:
    >>> 1.mknod /dev/null c 2 2
    >>> 2. chmod 666 /dev/null
    >>> God bless my carelessness and your kind hearted

    >> The Documentation/devices.txt

    >
    > Where is that?


    In the Linux kernel source tree.

    >> and what I've got on my system agree
    >> with Måns (i.e. 1 3), not with what you found on the web. 2 2 should
    >> be a psdeudo-tty.

    >
    > Where is the documentation regarding major and minor device numbers?


    For Linux systems, in the file above-mentioned file. I don't know
    where other systems keep this information.

    --
    Måns Rullgård
    mans@mansr.com

  7. Re: how to recovry /dev/null

    Joe Pfeiffer wrote:
    > The Documentation/devices.txt


    Matt writes:
    > Where is that?


    In the kernel source tree.

    --
    John Hasler
    john@dhh.gt.org
    Dancing Horse Hill
    Elmwood, WI USA

  8. Re: how to recovry /dev/null

    Matt writes:

    > Joe Pfeiffer wrote:
    >>
    >> The Documentation/devices.txt

    >
    > Where is that?


    Sorry -- .../Documentation/ is a directory in the kernel source tree.
    Where exactly it is depends on your distribution (and whether you've
    even downloaded the source tree); on my debian testing system, the
    most recent source tree I've got is for 2.6.15, so the full path to
    the file I mentioned is
    /usr/src/linux-source-2.6.15/Documentation/devices.txt
    YMMV (a lot)

    >> and what I've got on my system agree
    >> with Mns (i.e. 1 3), not with what you found on the web. 2 2 should
    >> be a psdeudo-tty.

    >
    > Where is the documentation regarding major and minor device numbers?


    Describing major and minor numbers is easier than trying to find the
    documentation: under unix-derived systems, including Linux, to a
    first approximation devices can be divided into "character" devices
    and "block" devices. The essential differences between the two are
    whether the system is free to reorder writes to the devices, and
    whether they can have filesystems on them (character devices can't,
    block devices can). Within the two basic types of device, the major
    number gives the type of device, and the minor device gives which
    device of that type it is.

    The list of what devices have been assigned various major and minor
    numbers is in the file I described above.

  9. Re: how to recovry /dev/null

    Joe Pfeiffer wrote:
    > Matt writes:
    >
    >> Joe Pfeiffer wrote:
    >>> The Documentation/devices.txt

    >> Where is that?

    >
    > Sorry -- .../Documentation/ is a directory in the kernel source tree.
    > Where exactly it is depends on your distribution (and whether you've
    > even downloaded the source tree); on my debian testing system, the
    > most recent source tree I've got is for 2.6.15, so the full path to
    > the file I mentioned is
    > /usr/src/linux-source-2.6.15/Documentation/devices.txt
    > YMMV (a lot)
    >
    >>> and what I've got on my system agree
    >>> with Mns (i.e. 1 3), not with what you found on the web. 2 2 should
    >>> be a psdeudo-tty.

    >> Where is the documentation regarding major and minor device numbers?

    >
    > Describing major and minor numbers is easier than trying to find the
    > documentation: under unix-derived systems, including Linux, to a
    > first approximation devices can be divided into "character" devices
    > and "block" devices. The essential differences between the two are
    > whether the system is free to reorder writes to the devices, and
    > whether they can have filesystems on them (character devices can't,
    > block devices can). Within the two basic types of device, the major
    > number gives the type of device, and the minor device gives which
    > device of that type it is.
    >
    > The list of what devices have been assigned various major and minor
    > numbers is in the file I described above.


    thanks

+ Reply to Thread