01-filesystem and shell
TRANSCRIPT
-
8/4/2019 01-Filesystem and Shell
1/61
Introduction to filesystemIntroduction to shell
Filesystem and shell
Scripting and Computer Environment - Lecture 1
Saurabh Barjatiya
International Institute Of Information Technology, Hyderabad
26 July, 2011
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
2/61
Introduction to filesystemIntroduction to shell
About files / directoriesWorking with files / directories
Contents
1 Introduction to filesystemAbout files / directories
Working with files / directories
2 Introduction to shellShell commands
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
3/61
Introduction to filesystemIntroduction to shell
About files / directoriesWorking with files / directories
About files / directories
What is file?
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
4/61
Introduction to filesystemIntroduction to shell
About files / directoriesWorking with files / directories
About files / directories
What is file?
What is directory?
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
I d i fil Ab fil / di i
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
5/61
Introduction to filesystemIntroduction to shell
About files / directoriesWorking with files / directories
About files / directories
What is file?
What is directory?
Windows Drives
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
I t d ti t fil t Ab t fil / di t i
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
6/61
Introduction to filesystemIntroduction to shell
About files / directoriesWorking with files / directories
About files / directories
What is file?
What is directory?
Windows DrivesLinux root
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystem About files / directories
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
7/61
Introduction to filesystemIntroduction to shell
About files / directoriesWorking with files / directories
About files / directories
What is file?
What is directory?
Windows DrivesLinux root
Path
Absolute path
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystem About files / directories
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
8/61
Introduction to filesystemIntroduction to shell
About files / directoriesWorking with files / directories
About files / directories
What is file?
What is directory?
Windows DrivesLinux root
Path
Absolute path
Relative path
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystem About files / directories
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
9/61
Introduction to filesystemIntroduction to shell
About files / directoriesWorking with files / directories
Working with files / directories
Creating / Editing / Deleting simple text files using GUI editor
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystem About files / directories
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
10/61
Introduction to filesystemIntroduction to shell
About files / directoriesWorking with files / directories
Working with files / directories
Creating / Editing / Deleting simple text files using GUI editor
Cut / Copy / Paste text
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystem About files / directories
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
11/61
yIntroduction to shell
/Working with files / directories
Working with files / directories
Creating / Editing / Deleting simple text files using GUI editor
Cut / Copy / Paste text
Creating / Deleting / Moving directories
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystem About files / directories
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
12/61
yIntroduction to shell
/Working with files / directories
Working with files / directories
Creating / Editing / Deleting simple text files using GUI editor
Cut / Copy / Paste text
Creating / Deleting / Moving directories
Information of file size / folder size
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystem About files / directories
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
13/61
Introduction to shell/
Working with files / directories
Working with files / directories
Creating / Editing / Deleting simple text files using GUI editor
Cut / Copy / Paste text
Creating / Deleting / Moving directories
Information of file size / folder size
Zipping files, Creating .zip, .tar, .tar.gz, .tar.bz2
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystem About files / directoriesfi /
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
14/61
Introduction to shell Working with files / directories
Working with files / directories
Creating / Editing / Deleting simple text files using GUI editor
Cut / Copy / Paste text
Creating / Deleting / Moving directories
Information of file size / folder size
Zipping files, Creating .zip, .tar, .tar.gz, .tar.bz2
Extracting .tar / .tar.gz / .tar.bz2 les
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemI d i h ll
About files / directoriesW ki i h fil / di i
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
15/61
Introduction to shell Working with files / directories
Working with files / directories
Creating / Editing / Deleting simple text files using GUI editor
Cut / Copy / Paste text
Creating / Deleting / Moving directories
Information of file size / folder size
Zipping files, Creating .zip, .tar, .tar.gz, .tar.bz2
Extracting .tar / .tar.gz / .tar.bz2 les
Explain storage units like bits, bytes, nibble, KB, MB, GB
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemI t d ti t sh ll
About files / directoriesW ki ith fil s / di t i s
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
16/61
Introduction to shell Working with files / directories
Working with files / directories
Creating / Editing / Deleting simple text files using GUI editor
Cut / Copy / Paste text
Creating / Deleting / Moving directories
Information of file size / folder sizeZipping files, Creating .zip, .tar, .tar.gz, .tar.bz2
Extracting .tar / .tar.gz / .tar.bz2 les
Explain storage units like bits, bytes, nibble, KB, MB, GB
Data transfer units bits/sec and storage device specicationunits.
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
17/61
Introduction to shell
Contents
1 Introduction to filesystemAbout files / directories
Working with files / directories
2 Introduction to shellShell commands
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
18/61
Introduction to shell
Shell commands - 1
ls, ls -l, ls -a
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
19/61
Introduction to shell
Shell commands - 1
ls, ls -l, ls -a
mkdir, mkdir -p
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
20/61
Introduction to shell
Shell commands - 1
ls, ls -l, ls -a
mkdir, mkdir -p
rmdir
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
21/61
Shell commands - 1
ls, ls -l, ls -a
mkdir, mkdir -p
rmdir
touch
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
22/61
Shell commands - 1
ls, ls -l, ls -a
mkdir, mkdir -p
rmdir
touch
rm, rm -r, rm -f
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
23/61
Shell commands - 1
ls, ls -l, ls -a
mkdir, mkdir -p
rmdir
touch
rm, rm -r, rm -f
cd
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
24/61
Shell commands - 1
ls, ls -l, ls -a
mkdir, mkdir -p
rmdir
touch
rm, rm -r, rm -f
cd
echo
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
25/61
Shell commands - 1
ls, ls -l, ls -a
mkdir, mkdir -p
rmdir
touch
rm, rm -r, rm -f
cd
echo
clear
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
26/61
Shell commands - 2
gedit (Not shell command, GUI editor)
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
27/61
Shell commands - 2
gedit (Not shell command, GUI editor)
tree
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
28/61
Shell commands - 2
gedit (Not shell command, GUI editor)
tree
mv
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
29/61
Shell commands - 2
gedit (Not shell command, GUI editor)
tree
mv
cp, cp -r, cp -u, cp -p
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
30/61
Shell commands - 2
gedit (Not shell command, GUI editor)
tree
mv
cp, cp -r, cp -u, cp -p
cat
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
31/61
Shell commands - 2
gedit (Not shell command, GUI editor)
tree
mv
cp, cp -r, cp -u, cp -p
cat
more
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell
Shell commands
S
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
32/61
Shell commands - 2
gedit (Not shell command, GUI editor)
tree
mv
cp, cp -r, cp -u, cp -p
cat
more
less
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Sh ll d 2
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
33/61
Shell commands - 2
gedit (Not shell command, GUI editor)
tree
mv
cp, cp -r, cp -u, cp -p
cat
more
less
head, head -
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Sh ll d 2
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
34/61
Shell commands - 2
gedit (Not shell command, GUI editor)
tree
mv
cp, cp -r, cp -u, cp -p
cat
more
less
head, head -
tail, tail -
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Sh ll d 2
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
35/61
Shell commands - 2
gedit (Not shell command, GUI editor)
tree
mv
cp, cp -r, cp -u, cp -p
cat
more
less
head, head -
tail, tail -
wc
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Sh ll d 3
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
36/61
Shell commands - 3
du, du -s, du -h, du -sh
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
37/61
Introduction to filesystemIntroduction to shell Shell commands
Shell commands 3
-
8/4/2019 01-Filesystem and Shell
38/61
Shell commands - 3
du, du -s, du -h, du -sh
tar cvf tar xvf
gzip
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands 3
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
39/61
Shell commands - 3
du, du -s, du -h, du -sh
tar cvf tar xvf
gzip
gunzip
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands 3
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
40/61
Shell commands - 3
du, du -s, du -h, du -sh
tar cvf tar xvf
gzip
gunzip
bzip2
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands 3
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
41/61
Shell commands - 3
du, du -s, du -h, du -sh
tar cvf tar xvf
gzip
gunzip
bzip2
bunzip2
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 3
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
42/61
Shell commands - 3
du, du -s, du -h, du -sh
tar cvf tar xvf
gzip
gunzip
bzip2
bunzip2
zip
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 3
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
43/61
Shell commands 3
du, du -s, du -h, du -sh
tar cvf tar xvf
gzip
gunzip
bzip2
bunzip2
zip
unzip
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 4
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
44/61
Shell commands 4
which
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 4
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
45/61
Shell commands 4
which
whereis
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 4
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
46/61
Shell commands 4
which
whereis
apropos
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 4
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
47/61
S
which
whereis
apropos
man, man -aK
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 4
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
48/61
which
whereis
apropos
man, man -aK
find
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 4
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
49/61
which
whereis
apropos
man, man -aK
find
locate
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 4
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
50/61
which
whereis
apropos
man, man -aK
find
locate
grep, grep -v, grep -A, grep -B
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 4
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
51/61
which
whereis
apropos
man, man -aK
find
locate
grep, grep -v, grep -A, grep -B
cut
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 5
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
52/61
w
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 5
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
53/61
w
who
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 5
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
54/61
w
who
whoami
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 5
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
55/61
w
who
whoami
/sbin/ifconfig
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 5
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
56/61
w
who
whoami
/sbin/ifconfig
ping
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 5
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
57/61
w
who
whoami
/sbin/ifconfig
ping
ln, ln -s
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystemIntroduction to shell Shell commands
Shell commands - 5
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
58/61
w
who
whoami
/sbin/ifconfig
ping
ln, ln -s
free, free -m
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystem
Introduction to shell Shell commands
Shell commands - 5
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
59/61
w
who
whoami
/sbin/ifconfig
ping
ln, ln -s
free, free -m
script
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystem
Introduction to shell Shell commands
Shell commands - 5
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
60/61
w
who
whoami
/sbin/ifconfig
ping
ln, ln -s
free, free -m
script
df, df -h
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
Introduction to filesystem
Introduction to shell Shell commands
Shell commands - 5
http://goforward/http://find/http://goback/ -
8/4/2019 01-Filesystem and Shell
61/61
w
who
whoami
/sbin/ifconfig
ping
ln, ln -s
free, free -m
script
df, df -h
chmod
Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment - Lecture 1 IIIT Hyderabad
http://goforward/http://find/http://goback/