SlideShare a Scribd company logo
1 of 8
Linux File Management
Geeta Vinnakota
Outline
• File Basics
• Pattern Search
• vi Editor
• File Compression
• Links
• Coming Up
• File Permissions
• Directory Management
1/23/2016 2
Files
cat filename prints file contents in the terminal for reading
less filename paginate the file. space to advance
touch filename create a new file
tail filename –n 10 prints the last 10 lines of the file
mv f1 f2 renames f1 to f2
cp f1 f2 copies f1 to f2
ls –l lists files with permissions
scp –rq user1@host1:/some/f1 user2@host2:some/f2 Securely copy a file between remote destinations
rq – Recursive Quiet
1/23/2016 3
Pattern Search
egrep –c ’update_user’ file1 Counts the number of lines with the pattern
Flags
-i ignore case
-l print name of files
-w search for words
-A 3 3 lines after the match
-B 3 3 lines before the match
-C 3 3 lines around the match
-r Search recursively
-n show line number
-v invert the match
-s return if the pattern is matched
1/23/2016 4
vi Editor
vi +89 file1 Opens file from line 89
Modes Command Mode – esc
Insert Mode – I
dd Delete line
yy Copy line
p paste
:16 Go to line 16
$ Go to end of line
^ Go to beginning of line
:q
:q!
:wq
Quit
Quit without saving
Save & quit
G Jump to end of file
1/23/2016 5
File Compression
tar –zcvf file1.tar.gz input_folder Compress the input folder & archive
tar –zxvf file1.tar.gx Decompress the arvhive into the folder
zip –r app.zip . Compress the current folder into a zip file
1/23/2016 6
Links
ln -s abc.txt abc_soft.txt Creates a Soft Link
Soft link points to the file in its current location. Just a
hyperlink. Does not work if the file is moved
ln abc.txt abc_hard.txt Creates a Hard link
Hard link points to the file wherever it is. They have
the same inode value
rm abc_soft.txt Removes the link
rm abc_hard.txt Removes the file
1/23/2016 7
Coming Up
• File Permissions
• Directory Management
1/23/2016 8

More Related Content

What's hot

Internal commands of dos
Internal commands of dosInternal commands of dos
Internal commands of dosNargiskhan786
 
Internal commands.29to30
Internal commands.29to30Internal commands.29to30
Internal commands.29to30myrajendra
 
Productivity tips - Introduction to linux for bioinformatics
Productivity tips - Introduction to linux for bioinformaticsProductivity tips - Introduction to linux for bioinformatics
Productivity tips - Introduction to linux for bioinformaticsBITS
 
SGN Introduction to UNIX Command-line 2015 part 1
SGN Introduction to UNIX Command-line 2015 part 1SGN Introduction to UNIX Command-line 2015 part 1
SGN Introduction to UNIX Command-line 2015 part 1solgenomics
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commandsSagar Kumar
 
CMD Command prompts
CMD Command promptsCMD Command prompts
CMD Command promptsAhmed Hesham
 
Text mining on the command line - Introduction to linux for bioinformatics
Text mining on the command line - Introduction to linux for bioinformaticsText mining on the command line - Introduction to linux for bioinformatics
Text mining on the command line - Introduction to linux for bioinformaticsBITS
 
Part 6 of "Introduction to linux for bioinformatics": Productivity tips
Part 6 of "Introduction to linux for bioinformatics": Productivity tipsPart 6 of "Introduction to linux for bioinformatics": Productivity tips
Part 6 of "Introduction to linux for bioinformatics": Productivity tipsJoachim Jacob
 
Directory Commands - R.D.Sivakumar
Directory Commands - R.D.SivakumarDirectory Commands - R.D.Sivakumar
Directory Commands - R.D.SivakumarSivakumar R D .
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structureSreenatha Reddy K R
 
Introduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examplesIntroduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examplesNoé Fernández-Pozo
 

What's hot (20)

Internal commands of dos
Internal commands of dosInternal commands of dos
Internal commands of dos
 
Basic linux day 4
Basic linux day 4Basic linux day 4
Basic linux day 4
 
Know the UNIX Commands
Know the UNIX CommandsKnow the UNIX Commands
Know the UNIX Commands
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Basic linux day 5
Basic linux day 5Basic linux day 5
Basic linux day 5
 
Internal commands.29to30
Internal commands.29to30Internal commands.29to30
Internal commands.29to30
 
Productivity tips - Introduction to linux for bioinformatics
Productivity tips - Introduction to linux for bioinformaticsProductivity tips - Introduction to linux for bioinformatics
Productivity tips - Introduction to linux for bioinformatics
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux Basics
Linux BasicsLinux Basics
Linux Basics
 
SGN Introduction to UNIX Command-line 2015 part 1
SGN Introduction to UNIX Command-line 2015 part 1SGN Introduction to UNIX Command-line 2015 part 1
SGN Introduction to UNIX Command-line 2015 part 1
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
CMD Command prompts
CMD Command promptsCMD Command prompts
CMD Command prompts
 
Text mining on the command line - Introduction to linux for bioinformatics
Text mining on the command line - Introduction to linux for bioinformaticsText mining on the command line - Introduction to linux for bioinformatics
Text mining on the command line - Introduction to linux for bioinformatics
 
Part 6 of "Introduction to linux for bioinformatics": Productivity tips
Part 6 of "Introduction to linux for bioinformatics": Productivity tipsPart 6 of "Introduction to linux for bioinformatics": Productivity tips
Part 6 of "Introduction to linux for bioinformatics": Productivity tips
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Ms DOS
Ms DOSMs DOS
Ms DOS
 
Dos commands
Dos commandsDos commands
Dos commands
 
Directory Commands - R.D.Sivakumar
Directory Commands - R.D.SivakumarDirectory Commands - R.D.Sivakumar
Directory Commands - R.D.Sivakumar
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
 
Introduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examplesIntroduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examples
 

Viewers also liked

Mca ii os u-5 unix linux file system
Mca  ii  os u-5 unix linux file systemMca  ii  os u-5 unix linux file system
Mca ii os u-5 unix linux file systemRai University
 
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3WE-IT TUTORIALS
 
File management ppt
File management pptFile management ppt
File management pptmarotti
 
Operating Systems - File Management
Operating Systems -  File ManagementOperating Systems -  File Management
Operating Systems - File ManagementDamian T. Gordon
 
Using VI Editor in Red Hat by Rohit Kumar
Using VI Editor in Red Hat by Rohit KumarUsing VI Editor in Red Hat by Rohit Kumar
Using VI Editor in Red Hat by Rohit KumarRohit Kumar
 
1359 Vi Editor
1359 Vi Editor1359 Vi Editor
1359 Vi Editortechbed
 
Introduction to vi editor
Introduction to vi editorIntroduction to vi editor
Introduction to vi editorU.P Police
 
The linux file system structure
The linux file system structureThe linux file system structure
The linux file system structureTeja Bheemanapally
 
Linux Directory Structure
Linux Directory StructureLinux Directory Structure
Linux Directory StructureKevin OBrien
 
Linux fundamental - Chap 03 file
Linux fundamental - Chap 03 fileLinux fundamental - Chap 03 file
Linux fundamental - Chap 03 fileKenny (netman)
 
Management file and directory in linux
Management file and directory in linuxManagement file and directory in linux
Management file and directory in linuxZkre Saleh
 
Linux files and file permission
Linux files and file permissionLinux files and file permission
Linux files and file permissionU.P Police
 
Linux Network commands
Linux Network commandsLinux Network commands
Linux Network commandsHanan Nmr
 

Viewers also liked (20)

Mca ii os u-5 unix linux file system
Mca  ii  os u-5 unix linux file systemMca  ii  os u-5 unix linux file system
Mca ii os u-5 unix linux file system
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
 
File management ppt
File management pptFile management ppt
File management ppt
 
Operating Systems - File Management
Operating Systems -  File ManagementOperating Systems -  File Management
Operating Systems - File Management
 
Using VI Editor in Red Hat by Rohit Kumar
Using VI Editor in Red Hat by Rohit KumarUsing VI Editor in Red Hat by Rohit Kumar
Using VI Editor in Red Hat by Rohit Kumar
 
1359 Vi Editor
1359 Vi Editor1359 Vi Editor
1359 Vi Editor
 
Introduction to vi editor
Introduction to vi editorIntroduction to vi editor
Introduction to vi editor
 
Vi editor
Vi editorVi editor
Vi editor
 
The linux file system structure
The linux file system structureThe linux file system structure
The linux file system structure
 
Linux Directory Structure
Linux Directory StructureLinux Directory Structure
Linux Directory Structure
 
Kernal
KernalKernal
Kernal
 
Linux fundamental - Chap 03 file
Linux fundamental - Chap 03 fileLinux fundamental - Chap 03 file
Linux fundamental - Chap 03 file
 
Management file and directory in linux
Management file and directory in linuxManagement file and directory in linux
Management file and directory in linux
 
Vi editor
Vi   editorVi   editor
Vi editor
 
Dma
DmaDma
Dma
 
Linux files and file permission
Linux files and file permissionLinux files and file permission
Linux files and file permission
 
Linux Network commands
Linux Network commandsLinux Network commands
Linux Network commands
 
Vi Editor
Vi EditorVi Editor
Vi Editor
 
Vi editor
Vi editorVi editor
Vi editor
 

Similar to Linux files

Similar to Linux files (20)

Basic unix
Basic unixBasic unix
Basic unix
 
Basic shell commands by Jeremy Sanders
Basic shell commands by Jeremy SandersBasic shell commands by Jeremy Sanders
Basic shell commands by Jeremy Sanders
 
The Linux Command Cheat Sheet
The Linux Command Cheat SheetThe Linux Command Cheat Sheet
The Linux Command Cheat Sheet
 
Unix slideshare
Unix slideshareUnix slideshare
Unix slideshare
 
workshop_1.ppt
workshop_1.pptworkshop_1.ppt
workshop_1.ppt
 
LinuxCommands (1).pdf
LinuxCommands (1).pdfLinuxCommands (1).pdf
LinuxCommands (1).pdf
 
Linux command line
Linux command lineLinux command line
Linux command line
 
BASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptxBASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptx
 
Chapter 4 Linux Basic Commands
Chapter 4 Linux Basic CommandsChapter 4 Linux Basic Commands
Chapter 4 Linux Basic Commands
 
Directories description
Directories descriptionDirectories description
Directories description
 
3.1.a linux commands reference
3.1.a linux commands reference3.1.a linux commands reference
3.1.a linux commands reference
 
Unix_QT.ppsx
Unix_QT.ppsxUnix_QT.ppsx
Unix_QT.ppsx
 
Unix_QT.ppsx
Unix_QT.ppsxUnix_QT.ppsx
Unix_QT.ppsx
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Linux Command Line - By Ranjan Raja
Linux Command Line - By Ranjan Raja Linux Command Line - By Ranjan Raja
Linux Command Line - By Ranjan Raja
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
 
Workshop on command line tools - day 1
Workshop on command line tools - day 1Workshop on command line tools - day 1
Workshop on command line tools - day 1
 
Unix reference sheet
Unix reference sheetUnix reference sheet
Unix reference sheet
 

More from Geeta Vinnakota

More from Geeta Vinnakota (6)

Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
Nginx
NginxNginx
Nginx
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Git
GitGit
Git
 
Rspec
RspecRspec
Rspec
 
Problem solving strategies
Problem solving strategiesProblem solving strategies
Problem solving strategies
 

Recently uploaded

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Recently uploaded (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Linux files

  • 2. Outline • File Basics • Pattern Search • vi Editor • File Compression • Links • Coming Up • File Permissions • Directory Management 1/23/2016 2
  • 3. Files cat filename prints file contents in the terminal for reading less filename paginate the file. space to advance touch filename create a new file tail filename –n 10 prints the last 10 lines of the file mv f1 f2 renames f1 to f2 cp f1 f2 copies f1 to f2 ls –l lists files with permissions scp –rq user1@host1:/some/f1 user2@host2:some/f2 Securely copy a file between remote destinations rq – Recursive Quiet 1/23/2016 3
  • 4. Pattern Search egrep –c ’update_user’ file1 Counts the number of lines with the pattern Flags -i ignore case -l print name of files -w search for words -A 3 3 lines after the match -B 3 3 lines before the match -C 3 3 lines around the match -r Search recursively -n show line number -v invert the match -s return if the pattern is matched 1/23/2016 4
  • 5. vi Editor vi +89 file1 Opens file from line 89 Modes Command Mode – esc Insert Mode – I dd Delete line yy Copy line p paste :16 Go to line 16 $ Go to end of line ^ Go to beginning of line :q :q! :wq Quit Quit without saving Save & quit G Jump to end of file 1/23/2016 5
  • 6. File Compression tar –zcvf file1.tar.gz input_folder Compress the input folder & archive tar –zxvf file1.tar.gx Decompress the arvhive into the folder zip –r app.zip . Compress the current folder into a zip file 1/23/2016 6
  • 7. Links ln -s abc.txt abc_soft.txt Creates a Soft Link Soft link points to the file in its current location. Just a hyperlink. Does not work if the file is moved ln abc.txt abc_hard.txt Creates a Hard link Hard link points to the file wherever it is. They have the same inode value rm abc_soft.txt Removes the link rm abc_hard.txt Removes the file 1/23/2016 7
  • 8. Coming Up • File Permissions • Directory Management 1/23/2016 8