Find the answer to your Linux question:
Results 1 to 2 of 2
hi all im new to linux and taking a class. i've come across a question tht i do not know. 1) in these two commmands /etc/passwd is misspelled as /etc/password ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2009
    Posts
    1

    differenciating error messages and alias


    hi all
    im new to linux and taking a class.
    i've come across a question tht i do not know.

    1)
    in these two commmands /etc/passwd is misspelled as /etc/password

    $ wc -1 /etc/password
    wc: /etc/password: No such file for directory

    $ wc -1 </etc/password
    bash: /etc/password: No such fule or directory

    whats the difference in the error message...



    aslo, create an alias for the date command, using the name, pwd.
    this means you have redefined pwd to work like date. does this work? does date and pwd work as before? when you log out and log in again, what happens to the alias?


    thanks

  2. #2
    Linux Engineer b2bwild's Avatar
    Join Date
    Jul 2008
    Location
    Behind You!
    Posts
    1,108
    Quote Originally Posted by Sunshine123 View Post
    1)
    in these two commmands /etc/passwd is misspelled as /etc/password

    $ wc -1 /etc/password
    wc: /etc/password: No such file for directory

    $ wc -1 </etc/password
    bash: /etc/password: No such fule or directory

    whats the difference in the error message...
    I spotted some gramatical differences.
    whats "file for directory" and "fule or directory" X_X

    well you should see the syntax carefully. and you will understand errors. (though its wrong)

    Well alias will surely work, but only in that user account.
    Never make any misteaks.

    Read my Blog at --> Penguin Inside Subscribe Feed

Posting Permissions

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