Forum Home
Press F1
 
Thread ID: 81261 2007-07-22 05:17:00 Unrar/unzip (Linux question) Myth (110) Press F1
Post ID Timestamp Content User
571386 2007-07-22 05:17:00 While we chatting linux at the moment... something I tried doing and got lost with recently:
how to unrar/unzip a password protected file, and also, how to rar/zip a file and adding a password?

I know both apps have man pages, but I still couldnt get it to work. Help :help:
Myth (110)
571387 2007-07-22 07:14:00 Cant say I've seen a zip or rar file while I've been using Linux (Ubuntu).

I think most of the files I dl were gzip, tar, or deb

And most of these I just selected the file / right mouse and you could select a program to extract it.
Speedy Gonzales (78)
571388 2007-07-22 07:48:00 I found out on IRC (Freenode) half the answer (how do I unrar a file with password). The answer:
unrar x filenameUnrar will automatically ask for the password
Myth (110)
571389 2007-07-22 09:25:00 You mean:

urar e filename.rar

For the zip files, I imagine it will be the same. To add a password to a zipped file you need to use the -P switch.
Jen (38)
571390 2007-07-22 11:26:00 You mean:

urar e filename.rar

For the zip files, I imagine it will be the same. To add a password to a zipped file you need to use the -P switch.I was told to use the x switch. Just tried on a sample file the 'x' and the 'e' switches. 'e' just extracted the files, 'x' created a new dir and extracted to that dir
Myth (110)
571391 2007-07-24 03:19:00 Probably all uncompressors will have the "t" option. That's "test", and will complain about any problems. It will also tell you the size and name of all files in the archive file. It's very useful. (I always use the "v", verbose, option too.

Normally, they won't "create a new directory" and uncompress into it. They will create a directory if the creator compressed a directory ( often with a recurcsive option) . ;) If the creator created the archive with a file specification something like "*", inside a directory, you will get all those files (messily) in your current directory when you uncompress it. :(

BTW, any decompresson, tar especially, which has an "f" (file) option has to have the f as the last option. It's interpreted as "use the file which immediately follows this f character". Sometimes people wonder why it keeps complaining that there's no such file to a command like tar xfv fred.tar . Every so often that catches me.
Graham L (2)
571392 2007-07-24 07:20:00 Oops yeah, forgot about tar :blush: Myth (110)
1