I have a rar archive that I downloaded, except some of the filenames are too long to be created by ubuntu. How can I extract all of the files?

The default archive manager on ubuntu goes through most of the files, fails, and deletes the entire folder. Ark extracts them and silently fails on names that are too long.

link|improve this question

1  
This is an ugly answer, but you can edit the filenames in a .rar client on windows. There is probably a way to do that in the command line version as well. – soandos Jan 6 at 21:15
feedback

1 Answer

up vote 2 down vote accepted

you could try & shorten the path it has to work with... in a shell i.e.:

mkdir /a; cd /a
unrar /path/to/file/with/long/names .

(make sure you sudo su - in ubuntu or you won't have sufficient privileges to write to the root dir.)

instead of trying to extract files to some directory like /long/directory/name/some/path/where/fish/live/ ... you should be able to extract them to a short dir like /a

from there... you should be able to manipulate your files however you need... and/or put them where they should go. Just remember to clean-up your / by removing the temporary directory.

link|improve this answer
Thanks, not a bad idea. I had completely spaced that unrar might try and work with full paths rather than relative directories. Seems...strange to use the full path when that adds to issues. – EricR Jan 6 at 21:25
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.