Unix command line does not work - Unix

This is a discussion on Unix command line does not work - Unix ; I modified sth in .cshrc file. THen if the command line does not work. when i typed some command like : - cd .. - pwd: command not found. But after I changed the .cshrc file into the original format, ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Unix command line does not work

  1. Unix command line does not work

    I modified sth in .cshrc file. THen if the command line does not work.
    when i typed some command like :
    - cd ..
    - pwd: command not found.

    But after I changed the .cshrc file into the original format, it still
    does not work.

    What is the problem?

    Thank you.


  2. Re: Unix command line does not work

    On 20 Oct 2005 12:32:38 -0700, vivian wrote:
    > I modified sth in .cshrc file. THen if the command line does not work.
    > when i typed some command like :
    > - cd ..
    > - pwd: command not found.
    >
    > But after I changed the .cshrc file into the original format, it still
    > does not work.
    >
    > What is the problem?


    does
    su -l $USER
    or su -l $LOGNAME work?

  3. Re: Unix command line does not work

    "vivian" writes:
    > I modified sth in .cshrc file. THen if the command line does not work.
    > when i typed some command like :
    > - cd ..
    > - pwd: command not found.
    >
    > But after I changed the .cshrc file into the original format, it still
    > does not work.


    (I assume "sth" means "something". Please take the time to spell out
    words; it makes your text much easier to read.)

    Can you tell us *what* you modified?

    It's not clear what's going on. Are you saying that when you type
    "cd ..", you get the error message "pwd: command not found"? Presumably
    you have an alias for cd that invokes the pwd command.

    Did you start a new shell after you fixed your .cshrc? If not, be
    aware that changes to .cshrc won't affect the current shell
    automatically; you have to re-source the file or start a new shell.

    The "pwd: command not found" message implies that you've probably
    clobbered your $PATH (or $path).

    Try "/bin/csh -l" or "/bin/tcsh -l", depending on what your default
    shell is. If that works, your .cshrc is probably ok, and you'll be
    fine next time you log in. If it doesn't, it probably still has a
    problem.

    In the meantime, if you type something like
    set path = ( /bin /usr/bin )
    (or whatever the appropriate value is for your system), you should be
    able to type commands without having to use the absolute pathname.

    --
    Keith Thompson (The_Other_Keith) kst-u@mib.org
    San Diego Supercomputer Center <*>
    We must do something. This is something. Therefore, we must do this.

  4. Re: Unix command line does not work

    Thank you both for your kind help.

    What I modified in .cshrc file is i added a line " setenv
    SKIP_CDS_DIALOG" for some cadence tool. SInce then, no command line
    works. I removed this line, and started new shell, still doesn't work.


  5. Re: Unix command line does not work

    I tried to type

    set path = (/bin/usr/bin),

    does not work either...


  6. Re: Unix command line does not work

    On 21 Oct 2005 07:18:17 -0700, vivian wrote:
    > Thank you both for your kind help.
    >
    > What I modified in .cshrc file is i added a line " setenv
    > SKIP_CDS_DIALOG" for some cadence tool. SInce then, no command line
    > works. I removed this line, and started new shell, still doesn't work.


    I would have to guess you have something else screwed up.
    I would
    mv .cshrc .cshrc_broke
    touch .cshrc
    su -l $USER

    That will get you a starting point to start adding/testing commands
    from .cshrc_broke into .cshrc.
    you then exit the new sessionl and
    su -l $USER
    everytime you add something to .cshrc


    Next time, cp .cshrc .cshrc_works before modifying.


  7. Re: Unix command line does not work

    "vivian" writes:
    > I tried to type
    >
    > set path = (/bin/usr/bin),
    >
    > does not work either...


    Why would you expect that to work? You almost certainly don't
    have a directory called "/bin/usr/bin".

    What I suggested was
    set path = ( /bin /usr/bin )
    The spaces are critical.

    I can't think of any reason why "setenv SKIP_CDS_DIALOG" would cause
    the symptoms you're seeing; probably there's something else causing
    the problem. (Some older versions of csh don't allow setenv with a
    single argument, but that should have given you an error message.)

    If your $PATH / $path variable is messed up, you should still be able
    to execute commands by typing their full pathnames; for example, type
    "/bin/cp" rather than "cp".

    What does "echo $PATH" display?

    (In csh, the $path shell variable is tied to the $PATH environment
    variable; changes in one are automatically reflected in the other.
    $PATH is a list of directory names separated by ':' characters. $path
    is an array of directory names; when echoed, the names will be
    separated by spaces.)

    BTW, I keep my .cshrc file in a CVS repository. If I mess something
    up (which will inevitably happen now and then), I can always revert to
    the previous version. (If you only need one copy of your .cshrc, RCS
    might be a simpler solution.)

    --
    Keith Thompson (The_Other_Keith) kst-u@mib.org
    San Diego Supercomputer Center <*>
    We must do something. This is something. Therefore, we must do this.

+ Reply to Thread