You are on page 1of 61

Introduction to filesystem Introduction 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

Introduction to filesystem Introduction to shell

About files / directories Working with files / directories

Contents

1

Introduction to filesystem About files / directories Working with files / directories

2

Introduction to shell Shell commands

Saurabh Barjatiya

Filesystem and shell Scripting and Computer Environment - Lecture 1

IIIT Hyderabad

Introduction to filesystem Introduction to shell

About files / directories Working with files / directories

About files / directories

What is file?

Saurabh Barjatiya

Filesystem and shell Scripting and Computer Environment - Lecture 1

IIIT Hyderabad

Introduction to filesystem Introduction to shell About files / directories Working 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 .

Introduction to filesystem Introduction to shell About files / directories Working 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 .

Lecture 1 IIIT Hyderabad .Introduction to filesystem Introduction to shell About files / directories Working with files / directories About files / directories What is file? What is directory? Windows Drives Linux root Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .

Introduction to filesystem Introduction to shell About files / directories Working with files / directories About files / directories What is file? What is directory? Windows Drives Linux root Path Absolute path Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Lecture 1 IIIT Hyderabad .

Introduction to filesystem Introduction to shell About files / directories Working with files / directories About files / directories What is file? What is directory? Windows Drives Linux root Path Absolute path Relative path Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Lecture 1 IIIT Hyderabad .

Lecture 1 IIIT Hyderabad .Introduction to filesystem Introduction to shell About files / directories Working 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 Introduction to shell About files / directories Working 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 .

Introduction to filesystem Introduction to shell About files / directories 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 Introduction to shell About files / directories 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 Introduction to shell About files / directories 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.tar. . .zip.tar.tar. . Creating .bz2 Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Lecture 1 IIIT Hyderabad .gz.

tar.gz. .zip.gz / .bz2 les Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Lecture 1 IIIT Hyderabad .tar.tar.tar. . .Introduction to filesystem Introduction to shell About files / directories 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.tar.tar / . Creating .bz2 Extracting .

MB.tar.Introduction to filesystem Introduction to shell About files / directories 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.gz / . . bytes.bz2 Extracting .gz.tar. Creating . nibble.tar / . KB.zip.tar.Lecture 1 IIIT Hyderabad .tar. . GB Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .bz2 les Explain storage units like bits. .tar.

tar. MB.Lecture 1 IIIT Hyderabad .tar.bz2 les Explain storage units like bits. GB Data transfer units bits/sec and storage device specication units. . Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment . bytes.bz2 Extracting .Introduction to filesystem Introduction to shell About files / directories 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.gz / . Creating .zip. KB.tar. nibble.gz. . .tar.tar.tar / .

Lecture 1 IIIT Hyderabad .Introduction to filesystem Introduction to shell Shell commands Contents 1 Introduction to filesystem About files / directories Working with files / directories 2 Introduction to shell Shell commands Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .

Introduction to filesystem Introduction to shell Shell commands Shell commands .Lecture 1 IIIT Hyderabad .1 ls. ls -a Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment . ls -l.

Lecture 1 IIIT Hyderabad .1 ls. mkdir -p Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Introduction to filesystem Introduction to shell Shell commands Shell commands . ls -l. ls -a mkdir.

Introduction to filesystem Introduction to shell Shell commands Shell commands .Lecture 1 IIIT Hyderabad . ls -l. ls -a mkdir.1 ls. mkdir -p rmdir Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .

ls -a mkdir. mkdir -p rmdir touch Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Introduction to filesystem Introduction to shell Shell commands Shell commands .1 ls.Lecture 1 IIIT Hyderabad . ls -l.

ls -l.1 ls. rm -r. ls -a mkdir. mkdir -p rmdir touch rm.Introduction to filesystem Introduction to shell Shell commands Shell commands . rm -f Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Lecture 1 IIIT Hyderabad .

1 ls.Lecture 1 IIIT Hyderabad . ls -l. rm -f cd Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment . ls -a mkdir. mkdir -p rmdir touch rm. rm -r.Introduction to filesystem Introduction to shell Shell commands Shell commands .

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 .1 ls.Introduction to filesystem Introduction to shell Shell commands Shell commands . ls -l.

rm -f cd echo clear Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Lecture 1 IIIT Hyderabad . ls -l.Introduction to filesystem Introduction to shell Shell commands Shell commands . rm -r.1 ls. mkdir -p rmdir touch rm. ls -a mkdir.

Introduction to filesystem Introduction to shell Shell commands Shell commands . GUI editor) Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Lecture 1 IIIT Hyderabad .2 gedit (Not shell command.

2 gedit (Not shell command. GUI editor) tree Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Introduction to filesystem Introduction to shell Shell commands Shell commands .Lecture 1 IIIT Hyderabad .

Lecture 1 IIIT Hyderabad .Introduction to filesystem Introduction to shell Shell commands Shell commands . GUI editor) tree mv Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .2 gedit (Not shell command.

Lecture 1 IIIT Hyderabad . cp -u. cp -p Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment . GUI editor) tree mv cp.2 gedit (Not shell command. cp -r.Introduction to filesystem Introduction to shell Shell commands Shell commands .

Lecture 1 IIIT Hyderabad . cp -u. GUI editor) tree mv cp. cp -r.Introduction to filesystem Introduction to shell Shell commands Shell commands .2 gedit (Not shell command. cp -p cat Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .

Lecture 1 IIIT Hyderabad . cp -u.2 gedit (Not shell command. cp -r.Introduction to filesystem Introduction to shell Shell commands Shell commands . GUI editor) tree mv cp. cp -p cat more Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .

Lecture 1 IIIT Hyderabad .2 gedit (Not shell command. cp -p cat more less Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment . cp -u.Introduction to filesystem Introduction to shell Shell commands Shell commands . GUI editor) tree mv cp. cp -r.

cp -r.Introduction to filesystem Introduction to shell Shell commands Shell commands . cp -u. head -<number> Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .2 gedit (Not shell command. cp -p cat more less head.Lecture 1 IIIT Hyderabad . GUI editor) tree mv cp.

cp -r. cp -u.2 gedit (Not shell command.Introduction to filesystem Introduction to shell Shell commands Shell commands . cp -p cat more less head. GUI editor) tree mv cp. head -<number> tail.Lecture 1 IIIT Hyderabad . tail -<number> Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .

tail -<number> wc Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Lecture 1 IIIT Hyderabad .Introduction to filesystem Introduction to shell Shell commands Shell commands .2 gedit (Not shell command. head -<number> tail. cp -r. cp -u. cp -p cat more less head. GUI editor) tree mv cp.

Lecture 1 IIIT Hyderabad . du -h. du -sh Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Introduction to filesystem Introduction to shell Shell commands Shell commands . du -s.3 du.

Introduction to filesystem Introduction to shell Shell commands Shell commands . du -sh tar cvf tar xvf Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Lecture 1 IIIT Hyderabad . du -h.3 du. du -s.

3 du.Introduction to filesystem Introduction to shell Shell commands Shell commands . du -s. du -sh tar cvf tar xvf gzip Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment . du -h.Lecture 1 IIIT Hyderabad .

Introduction to filesystem Introduction to shell

Shell commands

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 filesystem Introduction to shell

Shell commands

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 filesystem Introduction to shell

Shell commands

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

du -sh tar cvf tar xvf gzip gunzip bzip2 bunzip2 zip Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Introduction to filesystem Introduction to shell Shell commands Shell commands . du -s.3 du.Lecture 1 IIIT Hyderabad . du -h.

3 du. du -sh tar cvf tar xvf gzip gunzip bzip2 bunzip2 zip unzip Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Introduction to filesystem Introduction to shell Shell commands Shell commands . du -s. du -h.Lecture 1 IIIT Hyderabad .

Introduction to filesystem Introduction to shell Shell commands Shell commands .4 which Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Lecture 1 IIIT Hyderabad .

4 which whereis Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Lecture 1 IIIT Hyderabad .Introduction to filesystem Introduction to shell Shell commands Shell commands .

Introduction to filesystem Introduction to shell Shell commands Shell commands .Lecture 1 IIIT Hyderabad .4 which whereis apropos Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .

man -aK Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .4 which whereis apropos man.Introduction to filesystem Introduction to shell Shell commands Shell commands .Lecture 1 IIIT Hyderabad .

Lecture 1 IIIT Hyderabad .4 which whereis apropos man.Introduction to filesystem Introduction to shell Shell commands Shell commands . man -aK find Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .

Lecture 1 IIIT Hyderabad .Introduction to filesystem Introduction to shell Shell commands Shell commands . man -aK find locate Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .4 which whereis apropos man.

grep -A<n>. man -aK find locate grep.Lecture 1 IIIT Hyderabad . grep -v. grep -B<n> Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .4 which whereis apropos man.Introduction to filesystem Introduction to shell Shell commands Shell commands .

man -aK find locate grep.4 which whereis apropos man.Introduction to filesystem Introduction to shell Shell commands Shell commands . grep -v.Lecture 1 IIIT Hyderabad . grep -A<n>. grep -B<n> cut Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .

5 w Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Introduction to filesystem Introduction to shell Shell commands Shell commands .Lecture 1 IIIT Hyderabad .

Lecture 1 IIIT Hyderabad .Introduction to filesystem Introduction to shell Shell commands Shell commands .5 w who Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .

Lecture 1 IIIT Hyderabad .5 w who whoami Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Introduction to filesystem Introduction to shell Shell commands Shell commands .

Lecture 1 IIIT Hyderabad .Introduction to filesystem Introduction to shell Shell commands Shell commands .5 w who whoami /sbin/ifconfig Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .

Lecture 1 IIIT Hyderabad .5 w who whoami /sbin/ifconfig ping Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Introduction to filesystem Introduction to shell Shell commands Shell commands .

ln -s Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .Introduction to filesystem Introduction to shell Shell commands Shell commands .Lecture 1 IIIT Hyderabad .5 w who whoami /sbin/ifconfig ping ln.

free -m Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .5 w who whoami /sbin/ifconfig ping ln.Lecture 1 IIIT Hyderabad .Introduction to filesystem Introduction to shell Shell commands Shell commands . ln -s free.

Lecture 1 IIIT Hyderabad . ln -s free. free -m script Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .5 w who whoami /sbin/ifconfig ping ln.Introduction to filesystem Introduction to shell Shell commands Shell commands .

df -h Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment . ln -s free.Introduction to filesystem Introduction to shell Shell commands Shell commands .5 w who whoami /sbin/ifconfig ping ln.Lecture 1 IIIT Hyderabad . free -m script df.

5 w who whoami /sbin/ifconfig ping ln. ln -s free.Lecture 1 IIIT Hyderabad .Introduction to filesystem Introduction to shell Shell commands Shell commands . free -m script df. df -h chmod Saurabh Barjatiya Filesystem and shell Scripting and Computer Environment .