LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I extract a single directory from a .rar file? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-extract-a-single-directory-from-a-rar-file-945135/)

Rhys7891 05-15-2012 02:24 PM

How do I extract a single directory from a .rar file?
 
Hey, okay I'm new to all this and I only just figured out how to extract files from a .rar file so this might be a really obvious question but anyway...I used wget to download a .rar file from the internet and I tried to extract it but I started getting messages that some of the files already existed and did I want to overwrite them. The .rar file I downloaded was made up of several folders all with different files in them. I found out that the error messages were because when I extract the files it ignores the folders and just extracts all the individual files instead. How do I get it to extract one folder with all the files still in it? Hopefully this makes sense to someone :scratch: Thanks in advance

TobiSGD 05-15-2012 02:33 PM

I assume that you try to decompress the archive with
Code:

unrar e archive.rar
This will extract only the files, just as you described. If you use
Code:

unrar x archive.rar
the files will be extracted with their full path.
For more info on unrar look at
Code:

man unrar

Rhys7891 05-24-2012 01:59 PM

Oh wow, okay thanks for the help that worked :)


All times are GMT -5. The time now is 12:49 PM.