Unix Programming - how to use rar with mknod ?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > December 2005 > how to use rar with mknod ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author how to use rar with mknod ?
ujangmz@gmail.com

2005-12-27, 2:50 am

Hi all,

I am trying to use rar to compress few big files. I have chosen rar
over gzip or bzip since from my experience rar offers the best
compression ratio. I need to tar a few files together before I go ahead
and do the compression. Here is how I usually do it using gzip:

$ tar cvf - a01.dbf a02.dbf | gzip -v2 > a.tar.gz

but I could not figure out a way to do it with rar since I dont know
how to make rar accept
standard input or produce standard output.

I vaguely remember doing compression on the fly using mknod long time
ago, but could not
remember how to useit now.

Please help,

Regards
Ujang

Pascal Bourguignon

2005-12-27, 2:50 am

ujangmz@gmail.com writes:

> Hi all,
>
> I am trying to use rar to compress few big files. I have chosen rar
> over gzip or bzip since from my experience rar offers the best
> compression ratio. I need to tar a few files together before I go ahead
> and do the compression. Here is how I usually do it using gzip:
>
> $ tar cvf - a01.dbf a02.dbf | gzip -v2 > a.tar.gz
>
> but I could not figure out a way to do it with rar since I dont know
> how to make rar accept
> standard input or produce standard output.


You could try gzip -9 or bzip2 -9 to increase the effort spent on compressing.

> I vaguely remember doing compression on the fly using mknod long time
> ago, but could not
> remember how to useit now.


You would create a pipe. Perhaps something like:

mknod /tmp/torar p
rar /tmp/torar & tar cvf - *.dbf >> /tmp/torar

But it would be smarter to edit the source of rar to let it work as gzip.

--
__Pascal Bourguignon__ http://www.informatimago.com/

"This statement is false." In Lisp: (defun Q () (eq nil (Q)))
ujangmz@gmail.com

2005-12-27, 8:53 pm


Pascal Bourguignon wrote:
> ujangmz@gmail.com writes:
>
>
> You could try gzip -9 or bzip2 -9 to increase the effort spent on compressing.

i tried level 9 on both gzip and bzip2 but still the ratio could not
beat rar

>
>
> You would create a pipe. Perhaps something like:
>
> mknod /tmp/torar p
> rar /tmp/torar & tar cvf - *.dbf >> /tmp/torar

will try this and get back to you
>
> But it would be smarter to edit the source of rar to let it work as gzip.

my level of expertise is not up to that !
>
> --
> __Pascal Bourguignon__ http://www.informatimago.com/
>
> "This statement is false." In Lisp: (defun Q () (eq nil (Q)))


Colossus

2005-12-29, 7:50 am

Pascal Bourguignon wrote:
> But it would be smarter to edit the source of rar to let it work as gzip.


Unfortunately this is not possible since rar is not GPL.
--
Colossus
Xarchiver, a GTK2 only archive manager -
http://xarchiver.sourceforge.net
Cpsed, a Linux OpenGL 3D scene editor - http://cpsed.sourceforge.net
Mizio, a QT proxy hunter scanner tool - http://mizio.sourceforge.net

Pascal Bourguignon

2005-12-29, 7:51 am

"Colossus" <colossus73@gmail.com> writes:

> Pascal Bourguignon wrote:
>
> Unfortunately this is not possible since rar is not GPL.


It may be BSD or some other free license.

If not free, then sorry, you should use something else and I shouldn't
have answered, or you should have asked support to your vendor. >:-}

--
__Pascal Bourguignon__ http://www.informatimago.com/

This universe shipped by weight, not volume. Some expansion may have
occurred during shipment.
Victor Wagner

2005-12-29, 7:51 am

Pascal Bourguignon <spam@mouse-potato.com> wrote:
: "Colossus" <colossus73@gmail.com> writes:
: > Pascal Bourguignon wrote:
: >> But it would be smarter to edit the source of rar to let
it work as gzip.
: >
: > Unfortunately this is not possible since rar is not GPL.
: It may be BSD or some other free license.

It is closed source, and available only for few platforms.
Moreover, each new major version introduces incompatible new format, so
if person has rar 2.x he cannot unpack archives, produced with rar 3.x.

My advice is avoid using of rar whenever possible.

BTW, there is opensource archiver p7zip (p7zip.sf.net) which supports
some new and better compression method (.7z extension of archives) and
is as feature full as rar.

--
Giorgos Keramidas

2005-12-29, 6:05 pm

On Thu, 29 Dec 2005 12:17:44 +0100,
Pascal Bourguignon <spam@mouse-potato.com> wrote:
> "Colossus" <colossus73@gmail.com> writes:
>
> It may be BSD or some other free license.
>
> If not free, then sorry, you should use something else and I shouldn't
> have answered, or you should have asked support to your vendor. >:-}


It's not free. Downloading the source for FreeBSD is possible, but the
distribution tarball from http://files2.rarlab.com/rar/rarbsd-3.5.1.tar.gz
contains a license.txt file that says (among other non-free things):

1. All copyrights to RAR are exclusively owned by the author
- Alexander Roshal.

2. Anyone may use this software during a test period of 40
days. Following this test period of 40 days or less,
if you wish to continue to use RAR, you must register.

Pascal Bourguignon

2005-12-30, 3:00 am

Giorgos Keramidas <keramida@ceid.upatras.gr> writes:

> On Thu, 29 Dec 2005 12:17:44 +0100,
> Pascal Bourguignon <spam@mouse-potato.com> wrote:
>
> It's not free. Downloading the source for FreeBSD is possible, but the
> distribution tarball from http://files2.rarlab.com/rar/rarbsd-3.5.1.tar.gz
> contains a license.txt file that says (among other non-free things):
>
> 1. All copyrights to RAR are exclusively owned by the author
> - Alexander Roshal.
>
> 2. Anyone may use this software during a test period of 40
> days. Following this test period of 40 days or less,
> if you wish to continue to use RAR, you must register.


The important question is whether we are allowed to modify this source.


--
__Pascal Bourguignon__ http://www.informatimago.com/
Wanna go outside.
Oh, no! Help! I got outside!
Let me back inside!
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com