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 do I use the command line to tar and zip files?
- How do I use the Unix tar zip command?
- How do I use the command line to tar and distribute files?
- How do I extract files from a tar archive using the cmd command?
- How do I use the Unix tar xvf command to extract files?
- How do I use the tar command line in Windows 10?
- How do I use the shell to tar and zip files?
- How do I use gzip tar xvf to extract a file?
- How do I use the tar command in Windows command line?
- How do I choose between gzip and tar.gz when compressing files?
See more codes...