SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Managing File Structures
Managing
• Linux uses files for storing most object types on the system,
such as user programs and data
• Linux power tools has three main tool categories for
managing file “trees”
– Archive Tools
While working with a large amount files using an archive can reduce
the complexity in transferring, backing up or restoring entire file
“trees”
– Compression Tools
Used in order to reduce files footprint. Usually used on archives
– Synchronization Tools
Synchronize two directories
tar
• “tar” is a tool that can create and extract archives. This is the
most commonly used archiving tool on Unix and Linux
• Syntax:
 tar c[options] filename(s)
 tar x[options]
• Options:
 c create a new archive
 x extract an existing archive
 t list files inside archive
 f file use file as the archive destination (default is STDIN/STDOUT)
 v be verbose
 z use ZIP compression on archive
 j use BZIP compression on archive
gzip
• “gzip” is a compression tool which is based on the Lempel/Ziv
algorithm for data compression
• Syntax:
 gzip [options] filename(s)
• Options:
 -d extract a compressed file in-place (overwrite the original file)
 -c send output to the STDOUT instead of overwriting the file
 -N set compression level (1-fast 9-small)
Note: The default action of gzip is to compress a file.
gzip can only compress a single file, this usually being used with
an archiving tool
gzip
• “gzip” is bounded with some other command line tools which
can help working with compressed files. These are
implementations or other basic tools, while adding the
compression layer on top of them.
zless
zcat
zgrep
zmore
rpm
• “rpm” is the most fundamental tool for managing special
software package archives. The name stands for
Redhat Package Management and the archive format is
dedicated to this task.
• Creating rpm archives is usually done by software vendors or
distributors.
• Syntax:
 rpm [options] filename(s)
• Options:
 -i install a new package
 -e erase a package
rpm
 -v be verbose
 -h display progress bar hashes
 -qa query all installed packages on the system
 -qi package show information on package
 -ql package show list of all files included in package
 -qf file show the origin package of file
• Examples
rpm -ivh mySoftware.rpm
rpm -e mySoftware
rpm -qi perl
rpm -qf /bin/bash
rsync
• “rsync” is a synchronization tool for files and directory
structures in Unix and Linux. It support both local and remote
synchronization. After the initial sync, it will only transfer new
pieces of data
• Syntax:
 rsync [options] source destination
• Options:
 -a archive. preserve permissions, times stamps, etc
 -z use compression when transferring files
 -v be verbose
rsync
• Example
# ls source/ dest/
dest/:
source/:
file1 file2 file3
# rsync -av source/ dest/
file1
file2
file3
sent 224 bytes received 72 bytes 197.33 bytes/sec
# echo 456 > source/file2
# rsync -av source/ dest/
file2
sent 131 bytes received 31 bytes 324.00 bytes/sec

Weitere ähnliche Inhalte

Was ist angesagt?

Unit3 browsing the filesystem
Unit3 browsing the filesystemUnit3 browsing the filesystem
Unit3 browsing the filesystem
root_fibo
 
Unit 12 finding and processing files
Unit 12 finding and processing filesUnit 12 finding and processing files
Unit 12 finding and processing files
root_fibo
 

Was ist angesagt? (20)

HDFS_Command_Reference
HDFS_Command_ReferenceHDFS_Command_Reference
HDFS_Command_Reference
 
Course 102: Lecture 17: Process Monitoring
Course 102: Lecture 17: Process Monitoring Course 102: Lecture 17: Process Monitoring
Course 102: Lecture 17: Process Monitoring
 
Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands
 
Hadoop File System Shell Commands,
Hadoop File System Shell Commands,Hadoop File System Shell Commands,
Hadoop File System Shell Commands,
 
Hadoop basic commands
Hadoop basic commandsHadoop basic commands
Hadoop basic commands
 
Basic commands of linux
Basic commands of linuxBasic commands of linux
Basic commands of linux
 
Top 10 Hadoop Shell Commands
Top 10 Hadoop Shell Commands Top 10 Hadoop Shell Commands
Top 10 Hadoop Shell Commands
 
Hadoop 20111215
Hadoop 20111215Hadoop 20111215
Hadoop 20111215
 
Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands
 
Basic command of hadoop
Basic command of hadoopBasic command of hadoop
Basic command of hadoop
 
Unix commands in etl testing
Unix commands in etl testingUnix commands in etl testing
Unix commands in etl testing
 
Linux commands
Linux commands Linux commands
Linux commands
 
Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems
 
Unit3 browsing the filesystem
Unit3 browsing the filesystemUnit3 browsing the filesystem
Unit3 browsing the filesystem
 
Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals
 
Linux commands
Linux commandsLinux commands
Linux commands
 
The basic concept of Linux FIleSystem
The basic concept of Linux FIleSystemThe basic concept of Linux FIleSystem
The basic concept of Linux FIleSystem
 
Directories description
Directories descriptionDirectories description
Directories description
 
Command Line Tools
Command Line ToolsCommand Line Tools
Command Line Tools
 
Unit 12 finding and processing files
Unit 12 finding and processing filesUnit 12 finding and processing files
Unit 12 finding and processing files
 

Ähnlich wie 12 linux archiving tools

Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
Chander Pandey
 

Ähnlich wie 12 linux archiving tools (20)

Unix cmc
Unix cmcUnix cmc
Unix cmc
 
Linux
LinuxLinux
Linux
 
Group13
Group13Group13
Group13
 
Unix ppt
Unix pptUnix ppt
Unix ppt
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
LinuxCommands (1).pdf
LinuxCommands (1).pdfLinuxCommands (1).pdf
LinuxCommands (1).pdf
 
Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
 
Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptx
 
unit 3 ppt file represented system......
unit 3 ppt file represented system......unit 3 ppt file represented system......
unit 3 ppt file represented system......
 
Linux administration training
Linux administration trainingLinux administration training
Linux administration training
 
intro unix/linux 11
intro unix/linux 11intro unix/linux 11
intro unix/linux 11
 
File systems for Embedded Linux
File systems for Embedded LinuxFile systems for Embedded Linux
File systems for Embedded Linux
 
CSA-lecture 6.pptx
CSA-lecture 6.pptxCSA-lecture 6.pptx
CSA-lecture 6.pptx
 
Linux 4 you
Linux 4 youLinux 4 you
Linux 4 you
 
LinuxTraining_26_Sept_2021.ppt
LinuxTraining_26_Sept_2021.pptLinuxTraining_26_Sept_2021.ppt
LinuxTraining_26_Sept_2021.ppt
 
MCLS 45 Lab Manual
MCLS 45 Lab ManualMCLS 45 Lab Manual
MCLS 45 Lab Manual
 
Linuxnishustud
LinuxnishustudLinuxnishustud
Linuxnishustud
 
linuxtl04.pptx
linuxtl04.pptxlinuxtl04.pptx
linuxtl04.pptx
 

Mehr von Shay Cohen

01 linux history overview
01 linux history overview01 linux history overview
01 linux history overview
Shay Cohen
 

Mehr von Shay Cohen (19)

Linux Performance Tunning Memory
Linux Performance Tunning MemoryLinux Performance Tunning Memory
Linux Performance Tunning Memory
 
Linux Performance Tunning Kernel
Linux Performance Tunning KernelLinux Performance Tunning Kernel
Linux Performance Tunning Kernel
 
Linux Performance Tunning introduction
Linux Performance Tunning introductionLinux Performance Tunning introduction
Linux Performance Tunning introduction
 
chroot and SELinux
chroot and SELinuxchroot and SELinux
chroot and SELinux
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/Core
 
Infra / Cont delivery - 3rd party automation
Infra / Cont delivery - 3rd party automationInfra / Cont delivery - 3rd party automation
Infra / Cont delivery - 3rd party automation
 
14 network tools
14 network tools14 network tools
14 network tools
 
13 process management
13 process management13 process management
13 process management
 
11 linux filesystem copy
11 linux filesystem copy11 linux filesystem copy
11 linux filesystem copy
 
10 finding files
10 finding files10 finding files
10 finding files
 
08 text processing_tools
08 text processing_tools08 text processing_tools
08 text processing_tools
 
07 vi text_editor
07 vi text_editor07 vi text_editor
07 vi text_editor
 
06 users groups_and_permissions
06 users groups_and_permissions06 users groups_and_permissions
06 users groups_and_permissions
 
05 standard io_and_pipes
05 standard io_and_pipes05 standard io_and_pipes
05 standard io_and_pipes
 
04 using and_configuring_bash
04 using and_configuring_bash04 using and_configuring_bash
04 using and_configuring_bash
 
03 browsing the filesystem
03 browsing the filesystem03 browsing the filesystem
03 browsing the filesystem
 
02 linux desktop usage
02 linux desktop usage02 linux desktop usage
02 linux desktop usage
 
09 string processing_with_regex copy
09 string processing_with_regex copy09 string processing_with_regex copy
09 string processing_with_regex copy
 
01 linux history overview
01 linux history overview01 linux history overview
01 linux history overview
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

12 linux archiving tools

  • 2. Managing • Linux uses files for storing most object types on the system, such as user programs and data • Linux power tools has three main tool categories for managing file “trees” – Archive Tools While working with a large amount files using an archive can reduce the complexity in transferring, backing up or restoring entire file “trees” – Compression Tools Used in order to reduce files footprint. Usually used on archives – Synchronization Tools Synchronize two directories
  • 3. tar • “tar” is a tool that can create and extract archives. This is the most commonly used archiving tool on Unix and Linux • Syntax:  tar c[options] filename(s)  tar x[options] • Options:  c create a new archive  x extract an existing archive  t list files inside archive  f file use file as the archive destination (default is STDIN/STDOUT)  v be verbose  z use ZIP compression on archive  j use BZIP compression on archive
  • 4. gzip • “gzip” is a compression tool which is based on the Lempel/Ziv algorithm for data compression • Syntax:  gzip [options] filename(s) • Options:  -d extract a compressed file in-place (overwrite the original file)  -c send output to the STDOUT instead of overwriting the file  -N set compression level (1-fast 9-small) Note: The default action of gzip is to compress a file. gzip can only compress a single file, this usually being used with an archiving tool
  • 5. gzip • “gzip” is bounded with some other command line tools which can help working with compressed files. These are implementations or other basic tools, while adding the compression layer on top of them. zless zcat zgrep zmore
  • 6. rpm • “rpm” is the most fundamental tool for managing special software package archives. The name stands for Redhat Package Management and the archive format is dedicated to this task. • Creating rpm archives is usually done by software vendors or distributors. • Syntax:  rpm [options] filename(s) • Options:  -i install a new package  -e erase a package
  • 7. rpm  -v be verbose  -h display progress bar hashes  -qa query all installed packages on the system  -qi package show information on package  -ql package show list of all files included in package  -qf file show the origin package of file • Examples rpm -ivh mySoftware.rpm rpm -e mySoftware rpm -qi perl rpm -qf /bin/bash
  • 8. rsync • “rsync” is a synchronization tool for files and directory structures in Unix and Linux. It support both local and remote synchronization. After the initial sync, it will only transfer new pieces of data • Syntax:  rsync [options] source destination • Options:  -a archive. preserve permissions, times stamps, etc  -z use compression when transferring files  -v be verbose
  • 9. rsync • Example # ls source/ dest/ dest/: source/: file1 file2 file3 # rsync -av source/ dest/ file1 file2 file3 sent 224 bytes received 72 bytes 197.33 bytes/sec # echo 456 > source/file2 # rsync -av source/ dest/ file2 sent 131 bytes received 31 bytes 324.00 bytes/sec

Hinweis der Redaktion

  1. Exercise: - create a new tar archive with all the files in your home directoryCreate a new folder: restoreMake sure your archive has all the required files
  2. Exrcise: - Which package installed the ls command ? - Which other command files were installed with it (filter out only command files)
  3. Example online: If time permits
  4. Exrcise: - Which package installed the ls command ? - Which other command files were installed with it (filter out only command files)