uniquesetr.blogg.se

Linux untar to a specific directory
Linux untar to a specific directory






linux untar to a specific directory
  1. #LINUX UNTAR TO A SPECIFIC DIRECTORY HOW TO#
  2. #LINUX UNTAR TO A SPECIFIC DIRECTORY INSTALL#
  3. #LINUX UNTAR TO A SPECIFIC DIRECTORY ARCHIVE#
  4. #LINUX UNTAR TO A SPECIFIC DIRECTORY FULL#
  5. #LINUX UNTAR TO A SPECIFIC DIRECTORY PC#

#LINUX UNTAR TO A SPECIFIC DIRECTORY ARCHIVE#

Open your terminal and set the directory to where the downloaded WordPress archive resides.

#LINUX UNTAR TO A SPECIFIC DIRECTORY PC#

On my PC the file wordpress-5.5.3.tar.gz is now present in directory /home/pragmalin/Downloads/Īs a first step we’ll extract the files and directories packed inside this TAR GZ archive. Go ahead and download the WordPress 5.5.3 archive from.

#LINUX UNTAR TO A SPECIFIC DIRECTORY INSTALL#

We are not actually going to install WordPress, but simply use the WordPress files and directories as a foundation for this article. WordPress is a hugely popular website content management system and runs on millions of websites, including the PragmaticLinux blog. Instead of creating a bunch of dummy files and directories, we might as well download the latest WordPress archive. Since we’ll be creating and extracting TAR GZ archives, we’ll need at least some files in a few directories for testing purposes. I’ll be using my Debian 10 based Thinkpad T450s, with Gnome desktop environment. For Debian/Ubuntu based systems you would run: If not, you can quickly install it with your distribution’s package manager. If the command outputs something, then the tar program is installed. To verify the presence of the tar program on your system, run the command: It just needs to have the tar program installed, which most Linux distributions install by default. A Raspberry PI, a server that you SSH into or a Linux install complete with desktop environment. For this reason, this article explains in detail how you create and extract a TAR GZ archive with the tar program.

linux untar to a specific directory

However, when working in the terminal, you need the tar command line program in Linux to create and extract TAR GZ archives. Personally, I use Double Commander as my file manager, which has build-in functionality to create and extract TAR GZ archives. Think of File Roller for the Gnome desktop environment and Ark for the KDE desktop environment. These ship with GUI programs to create and extract TAR GZ archive.

#LINUX UNTAR TO A SPECIFIC DIRECTORY FULL#

Not a big deal when a full blown graphical desktop environment runs on your PC. Regardless of your personal preference, when working in Linux you will encounter TAR GZ archives sooner or later. At the end of the day, personal preference decides which solution works best for you. When creating a TAR GZ archive, the files are first packed into the archive and then the resulting archive is compressed. One difference to note: When creating a ZIP archive, the files are individually compressed before they are packed into the archive.

linux untar to a specific directory

You pack a bunch of files together in a compressed way. There is nothing wrong with ZIP archives. Why not use ZIP archives instead? Well, you can. Think of e-mail attachment as one prominent example. Nowadays, with the Internet fully integrated in our daily lives, TAR GZ archives offer a great solution for sharing files with others. Packing these files in one compressed archive made them easy to move around and required less disk space. So to store files away that you no longer need to work with on a regular basis, but also do not want to delete. Why would you need TAR GZ archives? Historically, the main reason was to archive files. Followed by unpacking all the files contained within the TAR GZ archive. Meaning that it first uncompresses the archive file. When extracting a TAR GZ archive, tar repeats these step in reverse order. Hence the tar.gz file extension for the resulting archive. When creating a TAR GZ archive, you basically pack a collection of files together (the TAR part) and then compress the archive (the GZ part). The tar program makes it possible to quickly create and extract TAR GZ archives from the command line in Linux. Think of such tarballs as the Linux version of ZIP archives. These files are TAR GZ archives, also called tarballs. The more you work with Linux, to more often you get confronted with filenames that end with.

linux untar to a specific directory

#LINUX UNTAR TO A SPECIFIC DIRECTORY HOW TO#

This article teaches you how to create and extract a TAR GZ archive in the Linux terminal. Think of TAR GZ archives as the Linux version of ZIP archives, with the latter one being more common on MS Windows. A TAR GZ archive packs multiple files, including those in subdirectories, into one large archive file and compresses its contents. This is a file with the tar.gz extension. When working with Linux, sooner or later you encounter TAR GZ archives.








Linux untar to a specific directory