zip files in that way, except that tar files aren’t necessarily compressed. Tar files are a great way to conveniently store lots of massive files in a single location. Mkdir -p ~/Desktop/Images/Downloaded & tar xvjf -C ~/Desktop/Images/Downloaded/ The Takeaway If, for some reason, you need to create a directory and extract the files into it using just one command, here’s the command you need to enter: If you look in your Desktop/Images directory, you’ll see your file. If you want to extract the files to a location other than the current directory, you’ll need to specify a target directory using -c (specified directory). How to choose where to send your untarred tar.gz files: You can also add files whenever you want. In a Linux OS, you can open the tar archive just like you’d open any other directory. You needn’t untar tar.gz files every single time you want to add a new file. $ tar -tvf (Substituting your own archive name, naturally.) How to add to an existing tarball To see a list of all the files in a tarball, enter: Tar -zxvf How to list files in the archive: For example, to extract the entire archive, enter: If you want to extract an entire archive, specify the archive file name with no individual file names as arguments. –delete (GNU/Linux only): Delete files from the tarball How to untar tar.gz archives
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |