![]() RAR file, however I'm unsure if at this point I'm just capturing the result of the execution of the dialog box or that of the unrar command. This next part is supposed to capture the result of executing the extraction of the. ) | dialog -title "Extracting Files" -gauge "Please wait" 8 75 0 # extract the pathname of file being extractedĮcho "$f." # Display file name in the dialog box Unrar x "$file" "$dest" | while IFS="" read -r in do I Finally managed to make the program work, it extracts the files, prints the pathnames of the files being extracted, and display the gauge bar filling correctly as each file is extracted. Well, since no one has answered my question, I'm gonna answer it myself. Can someone point me in the right direction? I got this code from various examples I found online, but so far I cannot make it work. Pct="$(( 100*(++i)/fc ))" # calculate percentageĬat /dev/null but I cannot get the dialog box to display properly. What I want to do instead, is show a progress bar that shows the process in percentages using a dialog -gauge, but so far I only get the errorĬmd="$(unrar x "$file" "$dest")" &>/dev/nullįc="$(unrar l "$file" | wc -l)" # get file count inside RAR fileįc="$((fc-10))" # file count has 10 extra lines, remove them Press q to exit and arrows to scroll up/down.I'm trying to extract a RAR file in a destination directory with the unrar command, but I don't want to display the normal file list that unrar shows when executing. You can read the manual for more options: path and redirect outputs to unrar.log log file, use:įind. ![]() If you want to uncompress the archive with a full path, use the option x : This will uncompress the archive in the current directory, without creating a new folder. To extract rar archive archive.rar, use: ![]() rar, following volumes are numbered from. vn : Use the old style volume naming scheme, where the first volume file in a multi-volume set has the extension. ![]() m0 : compression level ( 0-store / 3-default / 5-best ) To create a rar archive with files of 200MB and with some other compression settings (got this from a scener) m3 : this is the default compression level This will save a significant amount of time and processing power for you and other users on your server. m0 : use a compression level of 0 (store only) Rar a -m0 archive.rar folder_to_be_rared/ To create a rar archive with a specified compression level (0-5): v50M : determine the size of each file in split archive, in this example you get files with size 50MB (if you wanted files of 512kB size you would write -v512k ) Rar a -v50M -R archive.rar folder_to_be_rared/ To create a rar archive that splits the file/files into multiple parts of equal size, use: Rar a -hppassword archive.rar folder_to_be_rared/ To create a password protected rar archive archive.rar with password set to password, where even file lists are encrypted, use: Rar a -ppassword archive.rar folder_to_be_rared/ To create a password protected rar archive archive.rar with password set to password, use: Rar a archive.rar file1.dat file2.dat file3.dat To create a rar archive archive.rar containing files file1.dat, file2.dat, file3.dat, use: ![]() To create a rar archive archive.rar containing directory called folder_to_be_rared, use the following command: Here are some useful examples of rar and unrar usage under Linux shell. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |