Unix command Cal, who, ps, ls, echo, meaning, Linux Function meaning of Cal, who, ps, ls, echo with example
Cal:- It produces the calender of the month or year
for eg:-
$ cal 7 2012
answer is
July 2012
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
*******************************
who:- it shows the user working on the system & the time of loging in
For eg:-
$ who
answer is
nikun console June 12 12:01
nidhi pts/4 June 12 12:04
jhon pts/4 June 12 12:06
there are currently three users nikun, nidhi & jhon. These are actually the user-id or username they used to login. please note that who does not include any header like in ps command.
The second column i.e "console" shows the name of he terminal the user is working on
********************************
ps:- It displays the process running in the system
for eg:-
$ ps
PID TTY Time CMD
496 ptsw 0:00 ksh
364 console 0:00 ksh
where PID is the process-id & ksh represents the korn shell
ps generates the header followed by a line containing the details of the process.
When you run several process, there will be multiple lines in the ps output
*********************************
ls:- It command is used to list the names of all the files available in the directory. Files are organised in a separate folder called directories.
For eg:-
$ ls
MATHS
chap 12
chap 13
chap 14
chap 15
wordsdir
progs
lengthdir
***********************************
echo:- It displays the message on the screen. it can work with the escape sequence like /c & /t as well as octal number like \007.
No comments:
Post a Comment