f, -file ARCHIVE– use archive file or device ARCHIVE bzip2 Archive File by Compressing an Directory or a Single File tar -cjvf sample_2 that we have added extra flag -f to the command.Here’s what the flag -f actually mean Sample_dir java_test abc.py sample_Ĭreate. Run the following command to achieve the goal tar -cvzf sample_ sample_dir java_test ls Let’s say, For example we want to compress the sample_dir directory, the java_test directory, and the abc.py file to a tar file called sample_. Sample_dir sample_dir.tgz Compressing Multiple Directories or Files at Once One this to notice is tar.gz and tgz both are similar. z, -gzip, -gunzip -ungzip– Compress the archive with gzip tar -cvzf sample_ ls Notice that we have added extra flag -z to the command.Here’s what the flag -z actually mean tar.gz file called sample_ with a directory /home/codebind/sample_dir or sample_dir in present working directory. The terminal command below will create a. f, -file ARCHIVE– use archive file or device ARCHIVE Create tar.gz or tgz Archive File by Compressing an Directory or a Single File x, -extract, -get– extract files from an archive Here’s what those flags (-cvf) actually mean tar file called sample_dir.tar with a directory /home/codebind/sample_dir or sample_dir in present working directory. Examples Create tar Archive File by Compressing an Directory or a Single File System administrators uses tar command frequently to rip a bunch of files or directories into highly compressed archive which are called tarball or tar, bzip and gzip in Linux/Unix system. tar command is used to Manipulates archives in Linux/Unix.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |