Hit Counters

Friday, December 26, 2008

General Commands in UNIX

1. Date:- Used to display Date and Time
$ date
$ date + % option
$ date + % D -> MM/DD/YY
$ date + % a -> sat
$ date + % A -> saturday
$ date + % h -> Dec
$ date + % m -> 12 (Month)
$ date + % y -> 09 (Year)
$ date + % d -> 01 (Day)
$ date + % T -> HH.MI.SS
$ date + % H -> HH (Hours)
$ date + % M -> Mi (Minutes)
$ date + % S -> SS (Seconds)
$ date + % D%T -> MM/DD/YY HH:Mi:SS
$ date + "% D%T" -> MM/DD/YY - HH:Mi:SS

Note: UNIX is space sensitive and case sensitive.

2. Man:- $ man
                              ( It gives help about Command)
ex:- $ man date

3. cal:- used to display calender
$ cal
$ cal 12 2009            (cal MM YYYY)
$ cal 2009                 (cal YYYY)

ex:- $ cal 9 1752

4. Who:- gives the List of users who are currently working in Operating System
$ who -> gives all users details
$ who am I -> gives only user information
$ who-H -> gives display with headings
ex:- $ who
 user     TTYNo     Time     IPAddress
User1   TTY01     10:00      *****

$ who-H
Name    Line       Time
User1   TTY01   10:00
5. Write:- used to send Messages to other users

ex:-   user1                                       |      User2
                          $ Write user2                         |      Message from user1
                           .......................                         |      ...................................
                           .......................                                 ...................................
                           (ctrl+d)                                                   (ctrl+d)

Note:- (ctrl+d -> quit the message)

No comments:

Post a Comment