Here is how you can use the for loop to make the task simple: Advertisement $ for z in *.tar.xz ![]() Let us suppose that a folder contains multiple tar.xz files and we want to extract them simultaneously. Here is how you can achieve the same task through one single command: $ for z in *.zip do unzip "$z" done Here is how you can use the for loop to make the task simple: $ for z in *.zip Let us suppose that a folder, a “zip_files” folder in our case, contains multiple zipped files and we want to extract them simultaneously. The Application Launcher can be accessed using the Windows/Super key on your keyboard. You can open it through the Application Launcher search as follows: We are using the Terminal application as the Debian command line. We have run the commands and procedures mentioned in this article on a Debian 10 Buster system. This article describes how you can use the for loop in bash shell to extract multiple files of the following types through the Debian command line: You can use it to perform multiple similar operations at once. Here comes the bash’s for loop to rescue. It can prove to be quite lengthy, and frankly illogical, to extract one by one by entering the file extraction commands one by one. The real deal is when we want to do the same task through the command line. Doing so through the Linux UI is fairly simple all you need to do is select all the files you want to extract, right-click, and use the extract option to extract them altogether. At times we have to extract multiple zipped and rar’d files at once, all located in a single folder. If you need space on your system or an external storage device, you can compress files into smaller archived files. You can use a compressed file to distribute related files on the Internet, all compressed into a single file, without any loss of data. Use -p option.File compression is a way to create archives that help us in saving time, creating space, and downloading and transferring software and data faster. Well, there are many times when we get a password-protected RAR file from the web or over email. Step 7: Unrar or uncompress some password protected RAR file unrar -x filename.rar /path-of-folerĮxample: unrar -x sample.rar ~/Downloads/test/ Now, extract rar content in the Test folder. If you don’t want to extract the RAR file content in the same directory where it exists then we can mention some other directory for it.įor example, let’s create a directory called: Test mkdir test Step 6: To extract the RAR file in another folder unrar -x sample.rarīefore extracting the content of some RAR compressed files using Unrar on Linux, we can list all the available folders and files inside it directly on our command terminal. Now, to extract, simply use Unrar with either x or e option along with the filename. cd DownloadsĪnd then to list the files available there, we can use: ls I have a file called sample.rar in the Downloads folder, then first I will switch to the Downloads folder. Replace the filename.rar with the actual RAR file that you want to extract. rar file then how to use Unrar to extract or uncompress the same using command line: unrar -x filename.rar Step 4: Extract a RAR File using Unrar on Debian Linux p, -password Decrypt archive using a password extract-no-paths Don't create directories while extracting extract-newer Only extract newer files from the archive ![]() f, -force Overwrite files when extracting x, -extract Extract files from archive (default) Here is the output: Usage: unrar ARCHIVE Once the installation is completed we can see what are the options available to use with this command-line tool. ![]() Step 2: Command to install Unrar in Debian 11 or 10Īs I said in the introduction, Unrar is available via the default base repository of Debian Linux, hence just use the APT package manager to fetch its packages and install them using the given command: sudo apt install unrar-free Run the system update command to refresh the system APT cache and also to install if there are any updates available for your system. Install and use Unrar on Debian 11 or 10 Linux to extract RAR files Step 1: Apt update ![]() Step 7: Unrar or uncompress some password protected RAR file.Step 6: To extract the RAR file in another folder.Step 4: Extract a RAR File using Unrar on Debian Linux.Step 2: Command to install Unrar in Debian 11 or 10.Install and use Unrar on Debian 11 or 10 Linux to extract RAR files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |