1.rar
RAR a-m5-v12m myarchive myfiles # maximum limit of 12M
RAR e Myarchive.part1.rar #解压
Sub-volume compression
There is no default install RAR under Ubuntu, you can install RAR through sudo apt-get install rar,sudo apt-get install Unrar.
After installation, use the following command for volume compression:
RAR a-vsize Compressed file name or folder
For example: RAR a-v50000k eclipse.rar Eclipse
This command is for the Eclipse folder to be compressed, with a size of 50000k per volume and a compressed file named Eclipse.rar
2.tar
An example is provided:
To package the directory logs and split it into multiple 1M files, you can use the following command:
Tar cjf-logs/|split-b 1m-logs.tar.bz2.
When completed, the following files are generated:
Logs.tar.bz2.aa, Logs.tar.bz2.ab, Logs.tar.bz2.ac
To extract it, just execute the following command:
Cat logs.tar.bz2.a* | Tar XJ
Another example:
To compress a file test.pdf into a bytes file:
Tar czf-test.pdf | Split-b 500-test.tar.gz
The last thing to remind you is that the two "-" don't leak, that's the ouput of tar and the parameters of the input of split.
3, with 7z
Also use the above example
In film Upper directory operation, keep film directory name
Compression: 7z a film.7z film-v80m
Extract to current directory: 7z x film.7z.001
Extract to Directory A:mkdir a && CD a && 7z x. /film.7z.001
or 7z-oa x film.7z.001
Film Directory name not preserved
Compact CD film && find. | Xargs 7z a film.7z-v80m
Decompression 7z-oa x film.7z.001
In the case of 7z, the permissions (owner) attribute of the file will be lost, and the following method can be retained:
Compression:
Tar cf-film | 7z A-Si film.tar.7z-v80m
Decompression:
7z x-so film.tar.7z.001 | Tar XF-