SlideShare a Scribd company logo
1 of 12
Download to read offline
Chapter 4Chapter 4
File ArchiveFile Archive
Ref. Pge. 184
UsingUsing zipzip
●
zip archive.zip inpath ...zip archive.zip inpath ...
– Package files and perform compressionPackage files and perform compression
– Common optionsCommon options
●
­r­r : recurse into directories: recurse into directories
●
­1­1 : compress faster: compress faster
●
­9­9 : more compress: more compress
●
­e­e : perform encryption: perform encryption
UsingUsing unzipunzip
●
unzip archive.zip [list ...]unzip archive.zip [list ...]
– Extract files in list from a zipped file.Extract files in list from a zipped file.
– All files will be extracted without list.All files will be extracted without list.
– Common optionsCommon options
●
­l­l : list files in archive: list files in archive
●
­t­t : test only: test only
●
­n­n : never overwrite existing files: never overwrite existing files
●
­o­o : overwrite existing files without prompting: overwrite existing files without prompting
UsingUsing gzipgzip
●
gzip file ...gzip file ...
– Compress one or more file separatelyCompress one or more file separately
– The .gz suffix will automatically appendedThe .gz suffix will automatically appended
– The origin file will be removed after zippedThe origin file will be removed after zipped
– Common options:Common options:
●
­c­c : write on standard output, keep origin file: write on standard output, keep origin file
●
­r­r : recurse into directories: recurse into directories
●
­9­9 : more compress: more compress
●
­e­e : encryption: encryption
UsingUsing gunzipgunzip
●
gunzip file.gz ...gunzip file.gz ...
– Extract one or more gzipped fileExtract one or more gzipped file
– Common optionsCommon options
●
­c­c : write on standard output, keep zipped file: write on standard output, keep zipped file
●
­l­l : list files: list files
●
­t­t : test only: test only
UsingUsing bzip2bzip2 andand bunzip2bunzip2
●
Compression is generally considerablyCompression is generally considerably
better thanbetter than gzipgzip andand gunzipgunzip, with similar, with similar
options.options.
●
The file suffix isThe file suffix is .bz2.bz2
UsingUsing tartar
●
tar <mode> ­f archive.tar file ...tar <mode> ­f archive.tar file ...
– Store/extract files to/from a tape or disk archiveStore/extract files to/from a tape or disk archive
– Major modes:Major modes:
●
­c­c : create an archive: create an archive
●
­t­t : list the contents of an archive: list the contents of an archive
●
­x­x : extract files from an archive: extract files from an archive
Ref. Pge. 184
Common Options ofCommon Options of tartar
●
­z­z : using gzip/gunzip: using gzip/gunzip
●
­j­j : using bzip2/bunzip2: using bzip2/bunzip2
●
­O­O : extract files to standard output: extract files to standard output
●
­p­p : permissions preserved: permissions preserved
●
­P­P : keep the absolute path: keep the absolute path
●
­v­v : verbosely list files processed: verbosely list files processed
●
­X list.file­X list.file : Excluding files from list: Excluding files from list
●
­T list.file­T list.file : Only archive files from list: Only archive files from list
●
­T ­­T ­ : Only archive files from STDIN in pipe: Only archive files from STDIN in pipe
Incremental Backup UsingIncremental Backup Using tartar
●
Create a snapshot while performing fullCreate a snapshot while performing full
backup:backup:
tar ­cz ­g snapshot ­f full.tar.gz /dirtar ­cz ­g snapshot ­f full.tar.gz /dir
●
Perform incremental backup by referring toPerform incremental backup by referring to
the snapshot:the snapshot:
tar ­cz ­g snapshot ­f incr1.tar.gz /dirtar ­cz ­g snapshot ­f incr1.tar.gz /dir
tar ­cz ­g snapshot ­f incr2.tar.gz /dirtar ­cz ­g snapshot ­f incr2.tar.gz /dir
●
Tips:Tips:
– Return to full backup by removing the snapshot.Return to full backup by removing the snapshot.
Restore File UsingRestore File Using tartar
●
1st, change working to the parent1st, change working to the parent
●
Restore file from full backup:Restore file from full backup:
tar ­xvz ­f full.tar.gz tar ­xvz ­f full.tar.gz 
●
Then restore the incremental backups in order:Then restore the incremental backups in order:
tar ­xz ­g snapshot ­f incr1.tar.gz /dirtar ­xz ­g snapshot ­f incr1.tar.gz /dir
tar ­xz ­g snapshot ­f incr2.tar.gz /dirtar ­xz ­g snapshot ­f incr2.tar.gz /dir
UsingUsing cpiocpio
●
Perform backup:Perform backup:
cd /dircd /dir
find | cpio ­o | gzip > archive.cpio.gz find | cpio ­o | gzip > archive.cpio.gz 
●
Perform restore:Perform restore:
gunzip ­c archive.cpio.gz | cpio ­igunzip ­c archive.cpio.gz | cpio ­i
Ref. Pge. 186
UsingUsing dddd
●
Dumping a whole partition image:Dumping a whole partition image:
dd if=/dev/sda3 of=/dev/st0dd if=/dev/sda3 of=/dev/st0
●
Restore partition:Restore partition:
dd if=/dev/st0 of=/dev/sda3dd if=/dev/st0 of=/dev/sda3
●
Backup the MBR:Backup the MBR:
dd if=/dev/sda of=/sda.mbr bs=512 count=1dd if=/dev/sda of=/sda.mbr bs=512 count=1
Ref. Pge. 188

More Related Content

What's hot

Linux fundamental - Chap 09 pkg
Linux fundamental - Chap 09 pkgLinux fundamental - Chap 09 pkg
Linux fundamental - Chap 09 pkgKenny (netman)
 
Archiving in linux tar
Archiving in linux tarArchiving in linux tar
Archiving in linux tarInfoExcavator
 
PostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSPostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSTomas Vondra
 
11 linux filesystem copy
11 linux filesystem copy11 linux filesystem copy
11 linux filesystem copyShay Cohen
 
Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Bud Siddhisena
 
Useful linux-commands
Useful linux-commandsUseful linux-commands
Useful linux-commandsHimani Singh
 
LSA2 - 02 Control Groups
LSA2 - 02   Control GroupsLSA2 - 02   Control Groups
LSA2 - 02 Control GroupsMarian Marinov
 
2.1.using the shell
2.1.using the shell2.1.using the shell
2.1.using the shelldonv214
 
Linux Common Command
Linux Common CommandLinux Common Command
Linux Common CommandJeff Yang
 
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
 
Importance of linux system fundamental in technical documentation reading
Importance of linux system fundamental in technical documentation readingImportance of linux system fundamental in technical documentation reading
Importance of linux system fundamental in technical documentation readingKenny (netman)
 
Quick Guide with Linux Command Line
Quick Guide with Linux Command LineQuick Guide with Linux Command Line
Quick Guide with Linux Command LineAnuchit Chalothorn
 

What's hot (20)

Linux fundamental - Chap 09 pkg
Linux fundamental - Chap 09 pkgLinux fundamental - Chap 09 pkg
Linux fundamental - Chap 09 pkg
 
Archiving in linux tar
Archiving in linux tarArchiving in linux tar
Archiving in linux tar
 
Linux
LinuxLinux
Linux
 
PostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSPostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFS
 
11 linux filesystem copy
11 linux filesystem copy11 linux filesystem copy
11 linux filesystem copy
 
FUSE Filesystems
FUSE FilesystemsFUSE Filesystems
FUSE Filesystems
 
Basic Linux commands
Basic Linux commandsBasic Linux commands
Basic Linux commands
 
Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)
 
Useful linux-commands
Useful linux-commandsUseful linux-commands
Useful linux-commands
 
LSA2 - 02 Control Groups
LSA2 - 02   Control GroupsLSA2 - 02   Control Groups
LSA2 - 02 Control Groups
 
Chap 19 web
Chap 19 webChap 19 web
Chap 19 web
 
101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
 
Basic linux day 5
Basic linux day 5Basic linux day 5
Basic linux day 5
 
2.1.using the shell
2.1.using the shell2.1.using the shell
2.1.using the shell
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 
Linux Common Command
Linux Common CommandLinux Common Command
Linux Common Command
 
Os Bernier
Os BernierOs Bernier
Os Bernier
 
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
 
Importance of linux system fundamental in technical documentation reading
Importance of linux system fundamental in technical documentation readingImportance of linux system fundamental in technical documentation reading
Importance of linux system fundamental in technical documentation reading
 
Quick Guide with Linux Command Line
Quick Guide with Linux Command LineQuick Guide with Linux Command Line
Quick Guide with Linux Command Line
 

Viewers also liked

File system.
File system.File system.
File system.elyza12
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating systemtittuajay
 
Functions Of Operating System
Functions Of Operating SystemFunctions Of Operating System
Functions Of Operating SystemDr.Suresh Isave
 
Functions Of Operating Systems
Functions Of Operating SystemsFunctions Of Operating Systems
Functions Of Operating SystemsAkshay Kurup
 
Leadership - Training by Spreadminds
Leadership - Training by SpreadmindsLeadership - Training by Spreadminds
Leadership - Training by SpreadmindsMohamad Badr
 
Operating Systems - File Management
Operating Systems -  File ManagementOperating Systems -  File Management
Operating Systems - File ManagementDamian T. Gordon
 

Viewers also liked (9)

File system.
File system.File system.
File system.
 
File Management
File ManagementFile Management
File Management
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating system
 
File management
File managementFile management
File management
 
File system
File systemFile system
File system
 
Functions Of Operating System
Functions Of Operating SystemFunctions Of Operating System
Functions Of Operating System
 
Functions Of Operating Systems
Functions Of Operating SystemsFunctions Of Operating Systems
Functions Of Operating Systems
 
Leadership - Training by Spreadminds
Leadership - Training by SpreadmindsLeadership - Training by Spreadminds
Leadership - Training by Spreadminds
 
Operating Systems - File Management
Operating Systems -  File ManagementOperating Systems -  File Management
Operating Systems - File Management
 

Similar to Linux fundamental - Chap 04 archive

Compression Commands in Linux
Compression Commands in LinuxCompression Commands in Linux
Compression Commands in LinuxPegah Taheri
 
Basic commands of linux By Adam
Basic commands of linux By Adam Basic commands of linux By Adam
Basic commands of linux By Adam Mohammed Adam
 
Managing your data - Introduction to Linux for bioinformatics
Managing your data - Introduction to Linux for bioinformaticsManaging your data - Introduction to Linux for bioinformatics
Managing your data - Introduction to Linux for bioinformaticsBITS
 
Part 4 of 'Introduction to Linux for bioinformatics': Managing data
Part 4 of 'Introduction to Linux for bioinformatics': Managing data Part 4 of 'Introduction to Linux for bioinformatics': Managing data
Part 4 of 'Introduction to Linux for bioinformatics': Managing data Joachim Jacob
 
12 linux archiving tools
12 linux archiving tools12 linux archiving tools
12 linux archiving toolsShay Cohen
 
Linux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.comLinux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.comGreen Ecosystem
 
Bullwinkle introduction
Bullwinkle introductionBullwinkle introduction
Bullwinkle introductionTurner England
 
Compression
CompressionCompression
Compressionaswathyu
 
Linux tech talk
Linux tech talkLinux tech talk
Linux tech talkPrince Raj
 
Linux: A Getting Started Presentation
Linux: A Getting Started PresentationLinux: A Getting Started Presentation
Linux: A Getting Started PresentationNap Ramirez
 
Security coding c and c++ ch8 (1)
Security coding c and c++   ch8 (1)Security coding c and c++   ch8 (1)
Security coding c and c++ ch8 (1)Chia-Hao Tsai
 
(Practical) linux 104
(Practical) linux 104(Practical) linux 104
(Practical) linux 104Arie Bregman
 
Find and Locate: Two Commands
Find and Locate: Two CommandsFind and Locate: Two Commands
Find and Locate: Two CommandsKevin OBrien
 
Backup, Restore, and Disaster Recovery
Backup, Restore, and Disaster RecoveryBackup, Restore, and Disaster Recovery
Backup, Restore, and Disaster RecoveryMongoDB
 
Course 102: Lecture 24: Archiving and Compression of Files
Course 102: Lecture 24: Archiving and Compression of Files Course 102: Lecture 24: Archiving and Compression of Files
Course 102: Lecture 24: Archiving and Compression of Files Ahmed El-Arabawy
 

Similar to Linux fundamental - Chap 04 archive (20)

Compression Commands in Linux
Compression Commands in LinuxCompression Commands in Linux
Compression Commands in Linux
 
linuxtl04.pptx
linuxtl04.pptxlinuxtl04.pptx
linuxtl04.pptx
 
Basic commands of linux By Adam
Basic commands of linux By Adam Basic commands of linux By Adam
Basic commands of linux By Adam
 
Managing your data - Introduction to Linux for bioinformatics
Managing your data - Introduction to Linux for bioinformaticsManaging your data - Introduction to Linux for bioinformatics
Managing your data - Introduction to Linux for bioinformatics
 
Part 4 of 'Introduction to Linux for bioinformatics': Managing data
Part 4 of 'Introduction to Linux for bioinformatics': Managing data Part 4 of 'Introduction to Linux for bioinformatics': Managing data
Part 4 of 'Introduction to Linux for bioinformatics': Managing data
 
12 linux archiving tools
12 linux archiving tools12 linux archiving tools
12 linux archiving tools
 
Linux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.comLinux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.com
 
Bullwinkle introduction
Bullwinkle introductionBullwinkle introduction
Bullwinkle introduction
 
Compression
CompressionCompression
Compression
 
Linux tech talk
Linux tech talkLinux tech talk
Linux tech talk
 
Linux: A Getting Started Presentation
Linux: A Getting Started PresentationLinux: A Getting Started Presentation
Linux: A Getting Started Presentation
 
Linux for Beginners
Linux for  BeginnersLinux for  Beginners
Linux for Beginners
 
Security coding c and c++ ch8 (1)
Security coding c and c++   ch8 (1)Security coding c and c++   ch8 (1)
Security coding c and c++ ch8 (1)
 
Basic Linux day 6
Basic Linux day 6Basic Linux day 6
Basic Linux day 6
 
(Practical) linux 104
(Practical) linux 104(Practical) linux 104
(Practical) linux 104
 
101 apend. backups
101 apend. backups101 apend. backups
101 apend. backups
 
Find and Locate: Two Commands
Find and Locate: Two CommandsFind and Locate: Two Commands
Find and Locate: Two Commands
 
Backup, Restore, and Disaster Recovery
Backup, Restore, and Disaster RecoveryBackup, Restore, and Disaster Recovery
Backup, Restore, and Disaster Recovery
 
Course 102: Lecture 24: Archiving and Compression of Files
Course 102: Lecture 24: Archiving and Compression of Files Course 102: Lecture 24: Archiving and Compression of Files
Course 102: Lecture 24: Archiving and Compression of Files
 
4.8 apend backups
4.8 apend backups4.8 apend backups
4.8 apend backups
 

More from Kenny (netman)

rpi_audio configuration steps
rpi_audio configuration stepsrpi_audio configuration steps
rpi_audio configuration stepsKenny (netman)
 
Linux fundamental - Chap 16 System Rescue
Linux fundamental - Chap 16 System RescueLinux fundamental - Chap 16 System Rescue
Linux fundamental - Chap 16 System RescueKenny (netman)
 
Linux fundamental - Chap 15 Job Scheduling
Linux fundamental - Chap 15 Job SchedulingLinux fundamental - Chap 15 Job Scheduling
Linux fundamental - Chap 15 Job SchedulingKenny (netman)
 
Linux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell scriptLinux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell scriptKenny (netman)
 
Linux fundamental - Chap 13 account management
Linux fundamental - Chap 13 account managementLinux fundamental - Chap 13 account management
Linux fundamental - Chap 13 account managementKenny (netman)
 
Linux fundamental - Chap 07 vi
Linux fundamental - Chap 07 viLinux fundamental - Chap 07 vi
Linux fundamental - Chap 07 viKenny (netman)
 
Linux fundamental - Chap 06 regx
Linux fundamental - Chap 06 regxLinux fundamental - Chap 06 regx
Linux fundamental - Chap 06 regxKenny (netman)
 
Linux fundamental - Chap 05 filter
Linux fundamental - Chap 05 filterLinux fundamental - Chap 05 filter
Linux fundamental - Chap 05 filterKenny (netman)
 
Linux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shellLinux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shellKenny (netman)
 
Linux network monitoring hands-on pratice
Linux network monitoring hands-on praticeLinux network monitoring hands-on pratice
Linux network monitoring hands-on praticeKenny (netman)
 
Linux Network Monitoring
Linux Network MonitoringLinux Network Monitoring
Linux Network MonitoringKenny (netman)
 

More from Kenny (netman) (19)

rpi_audio configuration steps
rpi_audio configuration stepsrpi_audio configuration steps
rpi_audio configuration steps
 
Rpi audio
Rpi audioRpi audio
Rpi audio
 
Ha opensuse
Ha opensuseHa opensuse
Ha opensuse
 
Chap 18 net
Chap 18 netChap 18 net
Chap 18 net
 
About the Course
About the CourseAbout the Course
About the Course
 
Linux fundamental - Chap 16 System Rescue
Linux fundamental - Chap 16 System RescueLinux fundamental - Chap 16 System Rescue
Linux fundamental - Chap 16 System Rescue
 
Linux fundamental - Chap 15 Job Scheduling
Linux fundamental - Chap 15 Job SchedulingLinux fundamental - Chap 15 Job Scheduling
Linux fundamental - Chap 15 Job Scheduling
 
Linux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell scriptLinux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell script
 
Linux fundamental - Chap 13 account management
Linux fundamental - Chap 13 account managementLinux fundamental - Chap 13 account management
Linux fundamental - Chap 13 account management
 
Linux fundamental - Chap 07 vi
Linux fundamental - Chap 07 viLinux fundamental - Chap 07 vi
Linux fundamental - Chap 07 vi
 
Linux fundamental - Chap 06 regx
Linux fundamental - Chap 06 regxLinux fundamental - Chap 06 regx
Linux fundamental - Chap 06 regx
 
Linux fundamental - Chap 05 filter
Linux fundamental - Chap 05 filterLinux fundamental - Chap 05 filter
Linux fundamental - Chap 05 filter
 
Linux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shellLinux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shell
 
Linux system security
Linux system securityLinux system security
Linux system security
 
Linux network monitoring hands-on pratice
Linux network monitoring hands-on praticeLinux network monitoring hands-on pratice
Linux network monitoring hands-on pratice
 
Linux Network Monitoring
Linux Network MonitoringLinux Network Monitoring
Linux Network Monitoring
 
加密應用(GPG)
加密應用(GPG)加密應用(GPG)
加密應用(GPG)
 
金鑰管理 (PKI)
金鑰管理 (PKI)金鑰管理 (PKI)
金鑰管理 (PKI)
 
Linux firewall
Linux firewallLinux firewall
Linux firewall
 

Recently uploaded

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 

Linux fundamental - Chap 04 archive

  • 1. Chapter 4Chapter 4 File ArchiveFile Archive Ref. Pge. 184
  • 2. UsingUsing zipzip ● zip archive.zip inpath ...zip archive.zip inpath ... – Package files and perform compressionPackage files and perform compression – Common optionsCommon options ● ­r­r : recurse into directories: recurse into directories ● ­1­1 : compress faster: compress faster ● ­9­9 : more compress: more compress ● ­e­e : perform encryption: perform encryption
  • 3. UsingUsing unzipunzip ● unzip archive.zip [list ...]unzip archive.zip [list ...] – Extract files in list from a zipped file.Extract files in list from a zipped file. – All files will be extracted without list.All files will be extracted without list. – Common optionsCommon options ● ­l­l : list files in archive: list files in archive ● ­t­t : test only: test only ● ­n­n : never overwrite existing files: never overwrite existing files ● ­o­o : overwrite existing files without prompting: overwrite existing files without prompting
  • 4. UsingUsing gzipgzip ● gzip file ...gzip file ... – Compress one or more file separatelyCompress one or more file separately – The .gz suffix will automatically appendedThe .gz suffix will automatically appended – The origin file will be removed after zippedThe origin file will be removed after zipped – Common options:Common options: ● ­c­c : write on standard output, keep origin file: write on standard output, keep origin file ● ­r­r : recurse into directories: recurse into directories ● ­9­9 : more compress: more compress ● ­e­e : encryption: encryption
  • 5. UsingUsing gunzipgunzip ● gunzip file.gz ...gunzip file.gz ... – Extract one or more gzipped fileExtract one or more gzipped file – Common optionsCommon options ● ­c­c : write on standard output, keep zipped file: write on standard output, keep zipped file ● ­l­l : list files: list files ● ­t­t : test only: test only
  • 6. UsingUsing bzip2bzip2 andand bunzip2bunzip2 ● Compression is generally considerablyCompression is generally considerably better thanbetter than gzipgzip andand gunzipgunzip, with similar, with similar options.options. ● The file suffix isThe file suffix is .bz2.bz2
  • 7. UsingUsing tartar ● tar <mode> ­f archive.tar file ...tar <mode> ­f archive.tar file ... – Store/extract files to/from a tape or disk archiveStore/extract files to/from a tape or disk archive – Major modes:Major modes: ● ­c­c : create an archive: create an archive ● ­t­t : list the contents of an archive: list the contents of an archive ● ­x­x : extract files from an archive: extract files from an archive Ref. Pge. 184
  • 8. Common Options ofCommon Options of tartar ● ­z­z : using gzip/gunzip: using gzip/gunzip ● ­j­j : using bzip2/bunzip2: using bzip2/bunzip2 ● ­O­O : extract files to standard output: extract files to standard output ● ­p­p : permissions preserved: permissions preserved ● ­P­P : keep the absolute path: keep the absolute path ● ­v­v : verbosely list files processed: verbosely list files processed ● ­X list.file­X list.file : Excluding files from list: Excluding files from list ● ­T list.file­T list.file : Only archive files from list: Only archive files from list ● ­T ­­T ­ : Only archive files from STDIN in pipe: Only archive files from STDIN in pipe
  • 9. Incremental Backup UsingIncremental Backup Using tartar ● Create a snapshot while performing fullCreate a snapshot while performing full backup:backup: tar ­cz ­g snapshot ­f full.tar.gz /dirtar ­cz ­g snapshot ­f full.tar.gz /dir ● Perform incremental backup by referring toPerform incremental backup by referring to the snapshot:the snapshot: tar ­cz ­g snapshot ­f incr1.tar.gz /dirtar ­cz ­g snapshot ­f incr1.tar.gz /dir tar ­cz ­g snapshot ­f incr2.tar.gz /dirtar ­cz ­g snapshot ­f incr2.tar.gz /dir ● Tips:Tips: – Return to full backup by removing the snapshot.Return to full backup by removing the snapshot.
  • 10. Restore File UsingRestore File Using tartar ● 1st, change working to the parent1st, change working to the parent ● Restore file from full backup:Restore file from full backup: tar ­xvz ­f full.tar.gz tar ­xvz ­f full.tar.gz  ● Then restore the incremental backups in order:Then restore the incremental backups in order: tar ­xz ­g snapshot ­f incr1.tar.gz /dirtar ­xz ­g snapshot ­f incr1.tar.gz /dir tar ­xz ­g snapshot ­f incr2.tar.gz /dirtar ­xz ­g snapshot ­f incr2.tar.gz /dir
  • 11. UsingUsing cpiocpio ● Perform backup:Perform backup: cd /dircd /dir find | cpio ­o | gzip > archive.cpio.gz find | cpio ­o | gzip > archive.cpio.gz  ● Perform restore:Perform restore: gunzip ­c archive.cpio.gz | cpio ­igunzip ­c archive.cpio.gz | cpio ­i Ref. Pge. 186
  • 12. UsingUsing dddd ● Dumping a whole partition image:Dumping a whole partition image: dd if=/dev/sda3 of=/dev/st0dd if=/dev/sda3 of=/dev/st0 ● Restore partition:Restore partition: dd if=/dev/st0 of=/dev/sda3dd if=/dev/st0 of=/dev/sda3 ● Backup the MBR:Backup the MBR: dd if=/dev/sda of=/sda.mbr bs=512 count=1dd if=/dev/sda of=/sda.mbr bs=512 count=1 Ref. Pge. 188