cli-tarHow do I use tar.bz2 to compress files in a Unix environment?
To compress files in a Unix environment using tar.bz2, the following command should be used:
tar -cjvf [archive_name].tar.bz2 [file_name]
This command will create a compressed file named [archive_name].tar.bz2 containing the file [file_name].
tar: The Unix command for creating, modifying, and extracting files from an archive.-c: Create a new archive.-j: Use bzip2 compression.-v: Verbose mode.-f: Specify the name of the archive.[archive_name]: The name of the archive to be created.[file_name]: The file to be compressed and added to the archive.
If the command is successful, the following output will be displayed:
adding: [file_name] (deflated 69%)
For more information, please refer to the following links:
More of Cli Tar
- How can I use tar commands to zip a file?
- How do I use the command line to tar and zip files?
- How do I use gzip, tar, and zip to compress files?
- How do I use tar gzip with a password?
- How do I use gzip, tar, and unzip to compress files?
- How do I read a gzip tar.gz file?
- How do I convert a gzip file to a tar file?
- How do I decompress a UNIX tar file?
- How do I use the shell to tar and zip files?
- How do I use the Unix tar zip command?
See more codes...