how do i add a folder into a rar archive
hi there i have a fedora core 4 server that i control throw ssh
my question is how do i add a folder (with sub folders and files in it) to a rar archive? i have rar from rarlabs.com but can't find anywhere what the command is? p.s. i'm not a n00b but rather just a confused linux user (in linux i use ark but throw ssh/command-line i have no idea) |
Type "which rar" to find the command, type "rar a -r /some/dir /some/archive.rar" to recursively add files.
|
Why rar on Linux?
|
rar is not a commonly used archive format on Linux. There are a few command line tools for handling rar files, but they aren't very feature rich.
Not sure about other distros, but Ubuntu carries a few implementations for rar processors: unrar-free (universe repo). This is a GPL'd program which can extract rar archives. It has quite limited functionality. rar and unrar (multiverse repository). Command line tools with some more features, but not under a free license. I seem to remember something about shareware and having to register after so many uses, but I might be wrong there. |
tar and zip are much better alternatives in Linux. Especially if you plan on distributing your archive to multiple people.
|
For single files bzip2 gives very good compression. You can archive lots of files together in a .tar file, and then compress that using bzip2 to get good compression ratios. GNU's implementation of tar will do this all in one operation is you use the j option, e.g.
Code:
tar cjf myarchive.tar.bz2 files and directories to add ... Apart from this (in fact partly because of it), tar files can do things zip and rar files aren't suitable for - they can be used on non-random access devices such as tape drives - tar stands for tape archive). tar files can also contains multiple versions of a file with a given name, and you can choose which one to restore from the archive. Having said all that, if you're not in control of the formats (e.g. you're administering a website which distributes rar files for windows users), the coolness of tar archives doesn't help you much. HO hum. |
rar is not a commonly used archive format on Linux.
..is an argument against, what? There are a few command line tools for handling rar files, but they aren't very feature rich. Where do you get that from? Code:
rar.exe | grep ^RAR | gawk "{print $2}" Apart from this (in fact partly because of it), tar files can do things zip and rar files aren't suitable for RAR OTOH can manage compression (sort of like Bzip2 does), retain DAC rights, use passwords, archive files before or after a certain date, create volumes, add recovery data and then some. And all that w/o external helper apps, unlike tar. |
All times are GMT -5. The time now is 12:27 PM. |