To View the calender
Example : To see the current month
[root@localhost ~] # cal
August 2011
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Example : - TO see the past, current and next month
[root@localhost ~] # cal -3
July 2011 August 2011 September 2011
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 1 2 3 4 5 6 1 2 3
3 4 5 6 7 8 9 7 8 9 10 11 12 13 4 5 6 7 8 9 10
10 11 12 13 14 15 16 14 15 16 17 18 19 20 11 12 13 14 15 16 17
17 18 19 20 21 22 23 21 22 23 24 25 26 27 18 19 20 21 22 23 24
24 25 26 27 28 29 30 28 29 30 31 25 26 27 28 29 30
31
Example :- To see the calender of the current year
[root@localhost ~] # cal -y
Example: To see the calender for the month of December for the year 2010
[root@localhost ~] # cal 12 2010
Example: To see the calender for the full year 2009
[root@localhost ~] # cal 2009
To View help for a command (manual Pages)
Syntax :-
[root@localhost ~] # man <command>
To See the help for the command mkdir
[root@localhost ~] # man mkdir
To View the top 10 lines of a file
Example :-
[root@localhost ~] # head anaconda-ks.cfg
To View the top 5 lines of a file
Example :-
[root@localhost ~] # head -5 anaconda-ks.cfg
To view the bottom 10 lines of a file
Example :-
[root@localhost ~] # tail anaconda-ks.cfg
To view the bottom 3 lines of a file
Example :-
[root@localhost ~] # tail -3 anaconda-ks.cfg
Example : To see the current month
[root@localhost ~] # cal
August 2011
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Example : - TO see the past, current and next month
[root@localhost ~] # cal -3
July 2011 August 2011 September 2011
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 1 2 3 4 5 6 1 2 3
3 4 5 6 7 8 9 7 8 9 10 11 12 13 4 5 6 7 8 9 10
10 11 12 13 14 15 16 14 15 16 17 18 19 20 11 12 13 14 15 16 17
17 18 19 20 21 22 23 21 22 23 24 25 26 27 18 19 20 21 22 23 24
24 25 26 27 28 29 30 28 29 30 31 25 26 27 28 29 30
31
Example :- To see the calender of the current year
[root@localhost ~] # cal -y
Example: To see the calender for the month of December for the year 2010
[root@localhost ~] # cal 12 2010
Example: To see the calender for the full year 2009
[root@localhost ~] # cal 2009
To View help for a command (manual Pages)
Syntax :-
[root@localhost ~] # man <command>
To See the help for the command mkdir
[root@localhost ~] # man mkdir
To View the top 10 lines of a file
Example :-
[root@localhost ~] # head anaconda-ks.cfg
To View the top 5 lines of a file
Example :-
[root@localhost ~] # head -5 anaconda-ks.cfg
To view the bottom 10 lines of a file
Example :-
[root@localhost ~] # tail anaconda-ks.cfg
To view the bottom 3 lines of a file
Example :-
[root@localhost ~] # tail -3 anaconda-ks.cfg
0 comments:
Post a Comment