unable to run any command  except change Directory

Posted on 2007-07-27
Last Modified: 2013-12-27
hullo all,

One of our  running server(it's been up for 8 days) suddenly  have a problem  yesterday
the problem is whenever we used simple commands like ls, pwd, cat, grep it always shows the error ls: fatal: /dev/zero: open failed: No such file or directory
we were  unable to run any commands except cd
We tried to  reboot the sytem  but  it have some  boot up problem..

what could be  some of the  posible  reasons   for this..  it's running   smoothly then it suddenly have  this  errors.
Question by:manthanein
    LVL 84

    Accepted Solution

    cd is a built in, the others run a program on the disk drive.
    the set command should work too, and maybe echo
    but it sounds like you need a new /dev/zero
    LVL 7

    Author Comment

    the problem is  /dev/zero was located on the  disk..   Pleaese  help me..  I'm going  nuts   because  of this.
    LVL 20

    Expert Comment

    >> We tried to  reboot the sytem  but  it have some  boot up problem..

    Please post the error messages from the boot-up.
    LVL 7

    Expert Comment

    It seems like someone has replaced /dev/zero with a regular file, and not with a device file. Remove /dev/zero and recreate it using mknod (copy the major and minor from another solaris. I don't have one in front of me now) and you might be able to solve it all.
    LVL 7

    Author Comment

    well..  the problem was  some of the files  were really missing.  

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    FreeBSD on EC2 FreeBSD ( is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
    Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    This tutorial goes over how to archive and restore FreeBSD jails that are managed by ezjail.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now