SlideShare ist ein Scribd-Unternehmen logo
1 von 16
11-1
Day 6
gdfdgdfdh
fhfjdfhjgfh
gfgjdfhgjd
hffkkfjgkfj
11-2
Creating Backups
• Backup tools used:
– Gzip
– Bzip2
– Zip
– Tar
• Compressing files
• Decompressing files
• List the contents of an archive/compressed file
11-3
Gzip
• gzip--Gzip compress the size of the given files using Lempel-Ziv coding (LZ77).
Whenever possible, each file is replaced by one with the extension .gz.
syn: gzip {filename}
ex: gzip mydata.doc
• Decompressing a file that is created using gzip command. File is restored to
their original form using this command.
syn: gzip -d {.gz file}
gunzip {.gz file}
ex: gzip -d mydata.doc.gz
gunzip mydata.doc.gz
• List files from a GZIP archive
syn: gzip -l {.gz file}
ex: gzip -l mydata.doc.gz
11-4
Bzip2
• bzip2 :bzip2 compresses files using the Burrows-Wheeler block sorting text
compression algorithm, and Huffman coding. Compression is generally
considerably better than that achieved by gzip command. Whenever possible,
each file is replaced by one with the extension .bz2.
syn: bzip2 {filename}
ex: bzip2 mydata.doc
• Decompressing a file that is created using bzip2 command. File is restored to
their original form using this command.
syn: bzip2 -d {.bz2-file}
bunzip2 {.bz2-file}
ex: bzip2 -d mydata.doc.bz2
gunzip mydata.doc.bz2
• Listing the files from a bzip2 archive is not possible
11-5
Zip
• zip : zip is a compression and file packaging utility for Unix/Linux. Each file is 
stored in single .zip {.zip-filename} file with the extension .zip.
syn:  zip {.zip-filename} {filename-to-compress}
ex: zip mydata.zip mydata.doc
• Extract compressed files in a ZIP archive.
syn: unzip {.zip file}
ex: unzip file.zip
• List files from a ZIP archive
syn: unzip -l {.zip file}
ex: unzip -l mydata.zip
11-6
Tar
• tar : The GNU tar is archiving utility but it can be use to compressing large file(s). 
GNU tar supports both archive compressing through gzip and bzip2. If you have 
more than 2 files then it is recommended to use tar instead of gzip or bzip2.
syn:   tar -zcvf {.tgz-file} {files}
tar -jcvf {.tbz2-file} {files}
Options
-c - Create/copy
-f – files
-v – Verbose
-z: use gzip compress
-j: use bzip2 compress
ex:  tar -zcvf packagename.tar.gz files/dirs
11-7
Tar
– Untar or decompressed a file(s) that is created using tar compressing 
through gzip and bzip2 filter
syn: tar -zxvf {.tgz-file}
tar -jxvf {.tbz2-file}
Options
-x - Extract
-v - Verbose
-f – files
ex: tar -zxvf packagename.tar.gz
– List files from a TAR archive
Options
-t - Tabular view
-v - Verbose
-f – files
ex: tar -tvf packagename.tar.gz
11-8
Copying Files Remotely
• scp stands for secure cp (copy), which means you can copy files across ssh 
connection. That connection will be securely encrypted, it is a very secure way to 
copy files between computers.
syn: scp [[user@]from-host:]source-file [[user@]to-host:][destination-file]
from-host
Is the name or IP of the host where the source file is, this can be
omitted if the from-host is the host where you are actually issuing
the command
user
Is the user which have the right to access the file and directory,
that is supposed to be copied in the case of the from-host, and the
user who has the rights to write in the to-host
source-file
Is the file or files that are going to be copied to the destination
host, it can be a directory but in that case you need to specify
the -r option to copy the contents of the directory
destination-
file
Is the name that the copied file is going to take in the to-host, if
none is given all copied files are going to keep its names
11-9
SCP
• SCP Options
-p: Preserves the modification and access times, as well as the permissions
of the source-file in the destination-file
-q: Do not display the progress bar
-r: Recursive, so it copies the contents of the source-file (directory in this
case) recursively
-v: Displays debugging messages
11-10
SCP Examples
• Copy files from a local computer to a remote computer
ex: scp somefile username@server:/home/username/
ser@remote.server.com:/home/user/
• Copy files from a remote server to your local computer
ex: scp username@server:/home/username/file_name /home/local-username/file-name
• Copy files from a remote server to another remote computer
ex: scp user_name1@server1:/home/user_name1/file_name
user_name2@server2:/home/user_name2/
11-11
cURL and Wget
• cURL : is a software package which consists of command line tool and a library
for transferring data using URL syntax.
• Download a Single File
ex: curl http://google.com
• The above command will get the content of the URL and display it in the
STDOUT (i.e. on your terminal).
• To store the output in a file, you an redirect it as shown below. This will also
display some additional download statistics.
11-12
cURL and Wget
• Wget is a free utility for non-interactive download of files from the Web. It
supportsHTTP, HTTPS, and FTP protocols
• In order to download the web page google.com you would type
wget google.com
• The result will be saved as a file in the current directory. You can open and
view the file with a web browser.
• If there are connection problems wget will try up to 20 times to reconnect.
You can use the -t option to change the maximum number of attempts. For
example, with
wget -t 10 google.com
• it will try only up to 10 times.
11-13
Network Troubleshooting
• ping: will ping the host to see if it is alive or not.
syn: ping [options] <host_name>
Ex: ping google.com
ping google.com –c1 <linux>
ping google.com –t <windows>
• ifconfig: This command allows the operating system to setup network interfaces and allow
the user to view information about the configured network interfaces.
ex: ifconfig eth0 #view the network settings on the first Ethernet adapter
ifconfig –a #Display info on all network interfaces on server,active or inactive.
ifconfig eth0 down #If eth0 exists would take it down causing it cannot send or receive any
information
ifconfig eth0 up #If eth0 exists and in the down state would return it back to the up state
11-14
Network Troubleshooting
ifup and ifdown
• ifup - bring a network interface up
• ifdown - take a network interface down
ex: ifup -a #Bring up all the interfaces defined with auto in /etc/network/interfaces
ifup eth0 #Bring up interface eth0
ifdown -a #Bring down all interfaces that are currently up.
• Telnet: to connect to another remote computer.
ex: telnet <ip_address>
telnet <ip_address> <port>
11-15
Network Troubleshooting
• netstat– shows network status.
ex: netstat #Displays generic net statistics of the host you are currently
connnected to.
netstat –an #shows all the connections to the server including the source and
destination ips and ports if you have the proper permissions.
netstat –natp #display active internet connections
netstat –an|grep :80 #displays the active connection on port 80
11-16

Weitere ähnliche Inhalte

Was ist angesagt?

Basic command ppt
Basic command pptBasic command ppt
Basic command pptRohit Kumar
 
Basic linux commands for bioinformatics
Basic linux commands for bioinformaticsBasic linux commands for bioinformatics
Basic linux commands for bioinformaticsBonnie Ng
 
Linux Basic commands and VI Editor
Linux Basic commands and VI EditorLinux Basic commands and VI Editor
Linux Basic commands and VI Editorshanmuga rajan
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examplesabclearnn
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic CommandsHanan Nmr
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)meashi
 
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)Rodrigo Maia
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbookWave Digitech
 
Linux command for beginners
Linux command for beginnersLinux command for beginners
Linux command for beginnersSuKyeong Jang
 
Unix Command Line Productivity Tips
Unix Command Line Productivity TipsUnix Command Line Productivity Tips
Unix Command Line Productivity TipsKeith Bennett
 
linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014Peter Martin
 
Basic unix commands
Basic unix commandsBasic unix commands
Basic unix commandsswtjerin4u
 

Was ist angesagt? (20)

Linux commands
Linux commandsLinux commands
Linux commands
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
 
Basic linux commands for bioinformatics
Basic linux commands for bioinformaticsBasic linux commands for bioinformatics
Basic linux commands for bioinformatics
 
Linux Basic commands and VI Editor
Linux Basic commands and VI EditorLinux Basic commands and VI Editor
Linux Basic commands and VI Editor
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examples
 
Basic
BasicBasic
Basic
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)
 
Know the UNIX Commands
Know the UNIX CommandsKnow the UNIX Commands
Know the UNIX Commands
 
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Linux command for beginners
Linux command for beginnersLinux command for beginners
Linux command for beginners
 
Unix Command Line Productivity Tips
Unix Command Line Productivity TipsUnix Command Line Productivity Tips
Unix Command Line Productivity Tips
 
linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014
 
Linux day 1
Linux day 1Linux day 1
Linux day 1
 
BASIC COMMANDS OF LINUX
BASIC COMMANDS OF LINUXBASIC COMMANDS OF LINUX
BASIC COMMANDS OF LINUX
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Basic unix commands
Basic unix commandsBasic unix commands
Basic unix commands
 

Andere mochten auch

DTMF based Different Load control
DTMF  based Different Load controlDTMF  based Different Load control
DTMF based Different Load controlMaheshMankar7592
 
A minor project report HOME AUTOMATION USING MOBILE PHONES
A minor project report HOME AUTOMATION  USING  MOBILE PHONESA minor project report HOME AUTOMATION  USING  MOBILE PHONES
A minor project report HOME AUTOMATION USING MOBILE PHONESashokkok
 
My Final Year Project - Individual Control Home Automation System
My Final Year Project - Individual Control Home Automation SystemMy Final Year Project - Individual Control Home Automation System
My Final Year Project - Individual Control Home Automation SystemMichael Olafusi
 

Andere mochten auch (6)

DTMF based Different Load control
DTMF  based Different Load controlDTMF  based Different Load control
DTMF based Different Load control
 
Power transformers
Power transformersPower transformers
Power transformers
 
DTMF based load control
DTMF based load controlDTMF based load control
DTMF based load control
 
DTMF
DTMFDTMF
DTMF
 
A minor project report HOME AUTOMATION USING MOBILE PHONES
A minor project report HOME AUTOMATION  USING  MOBILE PHONESA minor project report HOME AUTOMATION  USING  MOBILE PHONES
A minor project report HOME AUTOMATION USING MOBILE PHONES
 
My Final Year Project - Individual Control Home Automation System
My Final Year Project - Individual Control Home Automation SystemMy Final Year Project - Individual Control Home Automation System
My Final Year Project - Individual Control Home Automation System
 

Ähnlich wie Basic Linux day 6

Ähnlich wie Basic Linux day 6 (20)

linuxtl04.pptx
linuxtl04.pptxlinuxtl04.pptx
linuxtl04.pptx
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
The Linux Command Cheat Sheet
The Linux Command Cheat SheetThe Linux Command Cheat Sheet
The Linux Command Cheat Sheet
 
Slug 2009 06 SELinux For Sysadmins
Slug 2009 06 SELinux For SysadminsSlug 2009 06 SELinux For Sysadmins
Slug 2009 06 SELinux For Sysadmins
 
Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet
 
Compression Commands in Linux
Compression Commands in LinuxCompression Commands in Linux
Compression Commands in Linux
 
LinuxCommands (1).pdf
LinuxCommands (1).pdfLinuxCommands (1).pdf
LinuxCommands (1).pdf
 
Linux tech talk
Linux tech talkLinux tech talk
Linux tech talk
 
Cp command in Linux
Cp command in LinuxCp command in Linux
Cp command in Linux
 
Basic linux commands
Basic linux commands Basic linux commands
Basic linux commands
 
Linux
LinuxLinux
Linux
 
50 Most Frequently Used UNIX Linux Commands -hmftj
50 Most Frequently Used UNIX  Linux Commands -hmftj50 Most Frequently Used UNIX  Linux Commands -hmftj
50 Most Frequently Used UNIX Linux Commands -hmftj
 
linux_Commads
linux_Commadslinux_Commads
linux_Commads
 
50 most frequently used unix
50 most frequently used unix50 most frequently used unix
50 most frequently used unix
 
50 most frequently used unix
50 most frequently used unix50 most frequently used unix
50 most frequently used unix
 
Rhel3
Rhel3Rhel3
Rhel3
 
Upload files-to-zenterprise-server-via-ftp
Upload files-to-zenterprise-server-via-ftpUpload files-to-zenterprise-server-via-ftp
Upload files-to-zenterprise-server-via-ftp
 
FUSE Filesystems
FUSE FilesystemsFUSE Filesystems
FUSE Filesystems
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Samba
SambaSamba
Samba
 

Kürzlich hochgeladen

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Kürzlich hochgeladen (20)

INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

Basic Linux day 6