-x: Extract, retrieve the files from of the tar file.To be clear, the command line options we used with tar for the. Once again, the files are listed to the terminal as they are extracted. Instead of using the -z (gzip) option, we will use the -j (bzip2) option. ![]() bz2 extension suffix tells us it has been compressed using the bzip2 command. To do this we’ll use almost exactly the same command as before but with one important difference. Where did this directory come from? It was contained in the tar file, and was extracted along with the files. The extracted files are in that directory. List the files in the directory with ls and you’ll see that a directory has been created called Ukulele Songs. This option must be followed by the name of the tar file. -f: File, the name of the tar file we want tar to work with.-z: Gzip, use gzip to decompress the tar file.-v: Verbose, list the files as they are being extracted.-x: Extract, retrieve the files from the tar file.Let’s extract the ukulele songs: tar -xvzf ukulele_Īs the files are extracted, they are listed in the terminal window. These files are in the Downloads directory. One file is called ukulele_, the other is called guitar_2. Let’s say you’ve downloaded two files of sheet music. You just need to use the appropriate tar command line options. bz2 extension suffix indicates that the archive has been compressed, using either the gzip or bzip2 compression algorithm. The tar command will work happily with both types of file, so it doesn’t matter which compression method was used-and it should be available everywhere you have a Bash shell.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |