We have met many Linux compression and packaging methods. The following describes the concept of the compress command in the Linux compression and packaging method. I have provided a variety of examples for you to check, I believe there will be a lot of gains after reading this ....
Compress command
[Root @ linux ~] # Compress [-dcr] file or directory
Parameters:
◆-D: extract Parameters
◆-R: the files in the directory can be compressed at the same time!
◆-C: Output compressed data to standardoutput (output to the screen)
Example 1:
Convert/etc/man. config into/tmp and compress it
[Root @ linux ~] # Cd/tmp
[Root @ linuxtmp] # cp/etc/man. config.
[Root @ linuxtmp] # compressman. config
[Root @ linuxtmp] # ls-l
-Rw-r -- 1rootroot2605Jul2711: 43man. config. Z
Example 2:
Unbind the compressed file
[Root @ linuxtmp] # compress-dman.config.Z
Example 3:
Compress man. config into another file for backup
[Root @ linuxtmp] # compress-cman.config> man. config. back. Z
[Root @ linuxtmp] # llman. config *
-Rw-r -- 1rootroot1_6jul2711: 43man. config
-Rw-r -- 1rootroot2605Jul2711: 46man. config. back. Z
This-c parameter is interesting! He will output the data in the compression process to the screen instead of writing it into a file. Z file. Therefore, we can output data to another file name through data stream redirection. We will talk about data stream redirection in details in bashshell!
The preceding section describes the compress commands in the Linux compression and packaging method. The following section describes the tar commands.
- Linux compression and packaging method 1)
- How to monitor the usage of Linux system resources
- A true story about Desktop Linux
- Debian edition for the Linux release
- Common Linux backup methods