Professional Documents
Culture Documents
INTRODUCE BY-
SATISH CHANDRA
MCA IInd sem
R.N. 0703614094
1
passwd:-
TO CHANGE YOUR PASSWORD.
$Passwd<enter>
(Current) unix password:********<enter>
new unix password: *******<enter>
retype new unix password:*******<enter>
2
who am i:-To know about your login.
$who am i<enter>
mca093 pts\5 feb 16 11:37 (172.16.2.109)
4
man
Online help about commands
5
tty
To know your terminal
$tty<enter>
/div/term/2.
6
lock
Lock your terminal
we have to away from our terminal for a while ,but don`t want to logout.
$lock<enter>
password:******
re-enter password:******
terminal locked by mca093 0 minutes ago
*The $ prompt disappear, system will remain lock in this condition for 30 minutes*
7
stty
Set Terminal characteristics
Terminal is divice with which a user communicates with system.
Stty use enormous number of keywords.
-a option display the curret setting.
$stty –a<enter>
speed 43820 boud; row=25; columns=80; ypixels=0;
xpixels=0; intr=del; quit=^\;erase=^h;kill=^u;
8
clear
To clear the screen
$clear<enter>
*the screen clears and the cursor is positioned at the top left corner of the screen*
9
tput
Use to clear argument
Use to highlight text
$ tput clear<enter>
*use cup argument to position the cursor to row no. 10 and column 10*
10
uname
Tells the machine in a network
$ uname -n
unix
11
date
Display the system date
$date<enter>
sat feb 16 11:30:45 ist 2008
we can also use in different wayes
$date + %m<enter>
02
or month name
$date +%n<enter>
feb
$date`+DATE:%d-%m-%y%n TIME:%H:%M:%S`<enter>
DATE:16-02-08
TIME:11:37:45
12
cal
To see calender
$cal<enter>
display current month calender
$cal 2008
display whole year calender
$ cal 05 2007
display may 2007 calender
13
bc
The calculator
$bc<enter>
calculate whatever you want.
14
expr
$expr 100+50<enter>
150
$expr 3\*2 (the \ just take away this special meaning of *)
6
//why the \ preceding the `*` in the second expression//
15
facter
Facterise the no. & print its prim facters
$facter<ent>
30
2
3
5
q<ent>
$
*type in positive number less than 2^46(7.2e13)*
16
units
It converts quantities in one scale to other scale
$units
you have:inch
you want:cm
17
ps1
To change prompt sign
$ps1=”unix”<ent>
unix (our new prompt is “unix”)
18
type
To know the location of a command file
$type ls
ls is /bin/ls
19
pwd
To know present working directory
$pwd
/home/mca093/satish:>$
20
mkdir
To make a directory
$mkdir satish<ent>
$ (one directory is created by satish)
$mkdir manish<ent>
$
21
ls
Listing files and directories
$ls<ent>
satish manish file1 file2 file3 file4 taj
22
cd
To change directory
home/mca093/:>$cd satish
home/mca093/satish:>$
23
cat
To creat &display files
Concatenation of files
$ cat file1
hi I am pursuing M.C..A IInd sem.
I am introducing unix commands. $ //(display all contents of file)
$ cat > file2
- unix operating system provides :-
- open source code
- cooperative tools and utility
- multiuser and multitasking
- excellent networking environment
- portability.
<ctrl-d>
$cat > file3
-ram
-mohan
<ctrl-d>
//file not exit then creat it creat empty files not read or write mode
25
rmdir
To remove directories
26
cp
Copying files
$cp file1 file2
27
rm
Deleting files
$rm file3 file4
28
mv
To rename files
$ taj file5
29
df
To find uot the free disk space
$df
30
du
To find out your own consumption
$du
76
31
chmod
To change file permission
a-all
$chmod ugo=r file1 (assign only read permission and remove all other permission)
32
umask
Default file permission
Default permission
For files rw-rw-rw- (octal 666)
For directories rwx rwx rwx (octal 777)
This default is transformed by substracting the user mask from it remove one or more
permission.
$umask
022
33
chown and chgroup
Changing file ownership
A file to have more then one name and yet maintain single copy in disk
35
more
Paging output
$more file1
--more—(35%)
{press q to exite}
More action
q quit
h help
36
wc
Line word & character counting
$wc file1
5 30 192 file1
$wc –l file1
5 file1 (show no. of lines)
$wc –w file1
30 file1 (number of words)
$wc –c file1
192 (no. of characters)
$ls | wc –l
$who | wc –l
37
pr
Paginating files
Prepares a file for printinge
$pr file1
Feb 16 11:38 2008 group1 page1
Pr option
OPTION DISCRIPTION
38
cmp
Comparing two files
40
Comm
What is common
41
head
Displaying the beginning of a file
42
tail
Displaying the end of a file
43
cut
Cutting a file vertically
44
paste
To past files
Cut can be pasted back with this
$bc<file3 | paste –d= file3
bc:- display output
45
sort
Ordering file
Short recorders a line in ASCII collating sequence starting from begning of the line.
$sort file3
(sort the contents of file and display sorted output)
$sort –n file3
(sort numerically)
$sort -3 file2
(stop sort after 3rd field)
$sort +3 file3
(start sort after skipping 3rd field)
46
greap
Search a regular expression and print it
GREAP OPTION
OPTION DESCRIPTION
47
banner
49
lp
To send the user`s print job to print queue
50
dd
To converts and copies a file allowing plenty of choices
51
ps
To show processes status
$ps
PID TTY TIME CMD
4126 pts/5 00:00:00 sh
4244 pts/5 00:00:00 ps
$ps
OPTION TO ps
Option significance