![]() To install the RAR command option in Linux, just execute the following command. So, here we need to install RAR command-line utility to create archive files. It has no option for creating RAR files under Linux. The unrar command is used to extract, list, or test archive files only. The below command will perform a complete integrity check for each file and displays the status of the file. To test the integrity of an archive file, use option unrar t. ![]() Name Size Packed Ratio Date Time Attr CRC Meth Ver It will display the list of files with their sizes, date, time, and permissions. To list files inside an archive file use the unrar l option. # unrar x tecmint.rarĪll OK Step 3: How to List a RAR File in Linux It will extract according to their folder structure see below the output of the command. To open/extract a RAR file with its original directory structure, just issue the below command with the unrar x option. To open/extract a RAR file in a specific path or destination directory, just use the unrar e option, it will extract all the files in the specified destination directory. UNRAR 4.20 beta 3 freeware Copyright (c) 1993-2012 Alexander Roshal To open/extract a RAR file in the current working directory, just use the following command with the unrar e option. Step 2: How to Open/Extract a RAR File in Linux If your distribution does not offer unrar package, you need to download the latest unrar/rar file and install it using the following commands. Doing this by hand would have taken me hours.On other popular Linux distributions, you can install it using your default package manager as shown. It took about 20 minutes to run through all the RAR files, but I used that time to create this tutorial. The final piece of the loop after the second semi-colon – “done” – indicates what the terminal should do once the loop completes. The “x” in that command tells the software to use the directory structure inside the RAR archive. The “unrar x “$i”” component tells the software to use the unrar function which unpacks the archive. The “do” command tells the loop what command to run. The “*.rar” component indicates that we want the loop to run through all the RAR files in the directory, regardless of the name of the file. The “for i in” part starts the loop (note: you can use any letter here). Why spend that much time when I could automate the process.Įnter a loop bash script in KDE’s Konsole: for i in *.rar do unrar x "$i" done Doing them one at a time via KDE’s Ark software would work, but it would have taken a long time. I had a collection of more than 150 RAR files in a single folder I needed to unrar (that is, open and extract from the archive). If you’re not familiar with RAR files, they are like ZIP files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |