Sunteți pe pagina 1din 12

Getting Started

Run
telnet 192.168.0.16

LINUX (Linux release 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005) (21)
login: bbacam54
Password for bbacam54:
login: Cannot contact any KDC for requested realm while getting initial credentials
Last login: Mon Apr 25 15:41:22 from 192.168.1.110
[bbacam54@LINUX ~]$

General Purpose Utilities


[bbacam54@LINUX ~]$ cal
April 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
[bbacam54@LINUX ~]$ cal 2011
2011
January
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
April
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

February
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

March
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

May
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

June
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

July
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
October
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

August
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

September
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

November
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

December
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

[bbacam54@LINUX ~]$ cal 5 2011


May 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
[bbacam54@LINUX ~]$ date
Mon Apr 25 15:50:24 IST 2011
[bbacam54@LINUX ~]$ date +%m
04
[bbacam54@LINUX ~]$ date +%h
Apr
[bbacam54@LINUX ~]$ date +%h%m
Apr04
[bbacam54@LINUX ~]$ date +%d
25
[bbacam54@LINUX ~]$ date +%H
15
[bbacam54@LINUX ~]$ date +%M
52
[bbacam54@LINUX ~]$ date +%S
00
[bbacam54@LINUX ~]$ date +%D
04/25/11
[bbacam54@LINUX ~]$ date +%T
15:53:21
[bbacam54@LINUX ~]$ who
bca2 pts/1
Apr 25 15:20
bca1 pts/2
Apr 25 15:09
bca1 pts/3
Apr 25 15:09
bca1 pts/4
Apr 25 15:09
bca1 pts/5
Apr 25 15:09
bca1 pts/6
Apr 25 15:14
bca1 pts/7
Apr 25 15:10
bca1 pts/8
Apr 25 15:09
bca1 pts/9
Apr 25 15:10
bca2 pts/10
Apr 25 15:09

(192.168.1.172)
(192.168.1.151)
(192.168.1.163)
(192.168.1.164)
(192.168.1.145)
(192.168.1.99)
(192.168.1.48)
(192.168.1.141)
(192.168.1.147)
(192.168.1.164)

bca1 pts/11
bca1 pts/12
bca1 pts/13
bca1 pts/14
bbacam53 pts/15
bca1 pts/16
bbacam80 pts/17
bca1 pts/18
bca1 pts/20
bbacam54 pts/21
bbacam84 pts/22
bca1 pts/24

Apr 25 15:10
Apr 25 15:15
Apr 25 15:15
Apr 25 15:18
Apr 25 15:59
Apr 25 15:46
Apr 25 16:22
Apr 25 15:38
Apr 25 15:48
Apr 25 15:49
Apr 25 15:49
Apr 25 15:49

(192.168.1.165)
(192.168.1.212)
(192.168.1.203)
(192.168.1.167)
(192.168.1.110)
(192.168.1.163)
(192.168.1.66)
(192.168.1.164)
(192.168.1.141)
(192.168.1.110)
(192.168.1.66)
(192.168.1.155)

[bbacam54@LINUX ~]$ who -Hu


NAME LINE
TIME
bca2
pts/1
Apr 25 15:20
bca1
pts/2
Apr 25 15:09
bca1
pts/3
Apr 25 15:09
bca1
pts/4
Apr 25 15:09
bca1
pts/5
Apr 25 15:09
bca1
pts/6
Apr 25 15:14
bca1
pts/7
Apr 25 15:10
bca1
pts/8
Apr 25 15:09
bca1
pts/9
Apr 25 15:10
bca2
pts/10
Apr 25 15:09
bca1
pts/11
Apr 25 15:10
bca1
pts/12
Apr 25 15:15
bca1
pts/13
Apr 25 15:15
bca1
pts/14
Apr 25 15:18
bbacam53 pts/15
Apr 25 15:59
bca1
pts/16
Apr 25 15:46
bbacam80 pts/17
Apr 25 16:22
bca1
pts/18
Apr 25 15:38
bca1
pts/20
Apr 25 15:48
bbacam54 pts/21
Apr 25 15:49
bbacam84 pts/22
Apr 25 15:49
bca1
pts/24
Apr 25 15:49

IDLE
01:03
01:06
01:03
01:05
01:06
01:08
01:14
01:07
01:05
01:18
01:09
01:03
01:03
01:06
00:01
00:40
.
00:49
00:39
.
.
00:38

PID
6477
5919
5930
5923
5925
6269
5932
5934
5936
5964
6044
6298
6300
6400
7567
7319
7697
7164
7398
7400
7459
7402

[bbacam54@LINUX ~]$ who am i


bbacam54 pts/21
Apr 25 15:49 (192.168.1.110)
[bbacam54@LINUX ~]$ uname
Linux
[bbacam54@LINUX ~]$ uname -r
2.6.9-5.ELsmp
[bbacam54@LINUX ~]$ uname -s
Linux

COMMENT
(192.168.1.172)
(192.168.1.151)
(192.168.1.163)
(192.168.1.164)
(192.168.1.145)
(192.168.1.99)
(192.168.1.48)
(192.168.1.141)
(192.168.1.147)
(192.168.1.164)
(192.168.1.165)
(192.168.1.212)
(192.168.1.203)
(192.168.1.167)
(192.168.1.110)
(192.168.1.163)
(192.168.1.66)
(192.168.1.164)
(192.168.1.141)
(192.168.1.110)
(192.168.1.66)
(192.168.1.155)

[bbacam54@LINUX ~]$ uname -m


i686
[bbacam54@LINUX ~]$ echo "HELLO"
HELLO
[bbacam54@LINUX ~]$ printf "HELLO"
HELLO[bbacam54@LINUX ~]$
[bbacam54@LINUX ~]$ bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
10 + 10
20
10 - 2
8
10 * 2
20
10 / 5
2
[bbacam54@LINUX ~]$ bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
x = 10
y = 20
x+y
30
[bbacam54@LINUX ~]$ passwd
Changing password for user bbacam54.
Changing password for bbacam54
(current) UNIX password:
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[bbacam54@LINUX ~]$

File System
LINUX (Linux release 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005) (21)
login: bbacam54
Password for bbacam54:
login: Cannot contact any KDC for requested realm while getting initial credentials
Last login: Thu Apr 26 15:44:46 from 192.168.1.42
[bbacam54@LINUX ~]$ pwd
/home/bbacam54
[bbacam54@LINUX ~]$ cd
[bbacam54@LINUX ~]$ mkdir Pankaj
[bbacam54@LINUX ~]$ cd Pankaj
[bbacam54@LINUX Pankaj]$ pwd
/home/bbacam54/Pankaj
[bbacam54@LINUX Pankaj]$ cd
[bbacam54@LINUX ~]$ rmdir Pankaj
[bbacam54@LINUX ~]$ pwd
/home/bbacam54

Basic File Attributes


[bbacam54@LINUX ~]$ ls
abc dj Pankaj
[bbacam54@LINUX ~]$ ls -x
abc dj Pankaj
[bbacam54@LINUX ~]$ ls -FX
abc dj/ Pankaj/
[bbacam54@LINUX ~]$ ls -Fx
abc dj/ Pankaj/
[bbacam54@LINUX ~]$ ls -aFx
./ ../ abc .bash_history .bash_logout .bash_profile .bashrc
dj/ .emacs .gtkrc Pankaj/
.zshrc
[bbacam53@LINUX ~]$

Simple Filters
LINUX (Linux release 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005) (2)
login: bbacam54
Password for bbacam54:
login: Cannot contact any KDC for requested realm while getting initial credentials
Last login: Thu Apr 28 15:44:46 from 192.168.1.42
[bbacam54@LINUX ~]$ cat>bba
12 Ankur 123
14 Aman 234
16 Rohit 345
18 Neeraj 456
20 Mayank 567
22 Varun 678
26 Garima 789
30 Rahul 890
[bbacam54@LINUX ~]$ head -2 bba
12 Ankur 123
14 Aman 234
[bbacam54@LINUX ~]$ cat>>bba
32 Gaurav 942
[bbacam54@LINUX ~]$ cat bba
12 Ankur 123
14 Aman 234
16 Rohit 345
18 Neeraj 456
20 Mayank 567
22 Varun 678
26 Garima 789
30 Rahul 890
32 Gaurav 942
[bbacam54@LINUX ~]$ tail -2 bba
30 Rahul 890
32 Gaurav 942
[bbacam54@LINUX ~]$ nl bba
1 12 Ankur 123
2 14 Aman 234
3 16 Rohit 345
4 18 Neeraj 456
5 20 Mayank 567
6 22 Varun 678

7 26 Garima 789
8 30 Rahul 890
9 32 Gaurav 942
[bbacam54@LINUX ~]$ cat>ab
4
2
8
3
5
1
6
7
9
[bbacam54@LINUX ~]$ sort ab
1
2
3
4
5
6
7
8
9
[bbacam54@LINUX ~]$ cat>ab
4
2
8
3
5
1
6
7
9
[bbacam54@LINUX ~]$ sort ab
1
2
3
4
5
6
7
8
9

[bbacam54@LINUX ~]$ pr ab
2011-04-28 16:42

ab

4
2
8
3
5
1
6
7
9
[bbacam54@LINUX ~]$ uniq ab
4
2
8
3
5
1
6
7
9
[bbacam54@LINUX ~]$ sort -u ab
1
2
3
4
5
6
7
8
9
[bbacam54@LINUX ~]$ cat>emp
abc Chairman 500
abc1 Director 501
abc2 Chairman 500
abc3 GM 1000
abc4 Director 501
abc5 DGM 2000
[bbacam54@LINUX ~]$ grep "Chairman" emp
abc Chairman 500
abc2 Chairman 500

Page 1

[bbacam54@LINUX ~]$ grep "GM" emp


abc3 GM 1000
abc5 DGM 2000
[bbacam54@LINUX ~]$ grep -c "Director" emp
2
[bbacam54@LINUX ~]$ grep -n "Chairman" emp
1:abc Chairman 500
3:abc2 Chairman 500
[bbacam54@LINUX ~]$ grep -v "Director" emp
abc Chairman 500
abc2 Chairman 500
abc3 GM 1000
abc5 DGM 2000
[bbacam54@LINUX ~]$ grep -i "Chairman" emp
abc Chairman 500
abc2 Chairman 500
[bbacam54@LINUX ~]$ cat>ab1
1 xyz 1000
2 abc 5000
3 def 9000
[bbacam54@LINUX ~]$ cut -f2,3 ab1
xyz 1000
abc 5000
def 9000
[bbacam54@LINUX ~]$ cut f3 ab1
1000
5000
9000
[bbacam54@LINUX ~]$ cat>ab2
ABC 400
XYZ 600
[bbacam54@LINUX ~]$ cut f2,3 ab1|tee shortlist
xyz 1000
abc 5000
def 9000
[bbacam54@LINUX ~]$ paste ab2 shortlist
ABC 400 xyz 1000
XYZ 600 abc 5000
def 9000

Linux Lab

Submitted To :
Mrs. Neha Gupta /
Shivani Dubey

Submitted By :
Pankaj Kumar
BBA(CAM)- 4th Sem.
06914301909

S-ar putea să vă placă și