1 |
Nick Rout wrote: |
2 |
|
3 |
>On Sat, 2005-08-13 at 09:36 -0400, Jerry McBride wrote: |
4 |
> |
5 |
> |
6 |
>>On Saturday 13 August 2005 01:32 am, Nick Rout wrote: |
7 |
>> |
8 |
>> |
9 |
>>>On Sat, 2005-08-13 at 00:58 -0400, Jerry McBride wrote: |
10 |
>>> |
11 |
>>> |
12 |
>>>>Anyone else here subscribe to the LINUX JOURNAL? |
13 |
>>>> |
14 |
>>>>In the September issue there's a neat article titled tha same as the |
15 |
>>>>subject line of this message. |
16 |
>>>> |
17 |
>>>>The skinny is, there's some really nice file compressors out there and I |
18 |
>>>>never heard of two of them... Anyone else know about LZMA or 7ZA? |
19 |
>>>> |
20 |
>>>>The two mentioned compression tools work pretty much like gzip. You tar |
21 |
>>>>up your files, pipe to the compression filter and then on to the target |
22 |
>>>>file. Below is a small example of what I've been seeing here at the |
23 |
>>>>shack. |
24 |
>>>> |
25 |
>>>>-rw-r--r-- 1 root root 12359680 Aug 12 23:57 backup.tar |
26 |
>>>>-rw-r--r-- 1 root root 3536665 Aug 13 00:01 backup.tar.7z |
27 |
>>>>-rw-r--r-- 1 root root 4438465 Aug 13 00:08 backup.tar.bz2 |
28 |
>>>>-rw-r--r-- 1 root root 4747637 Aug 13 00:03 backup.tar.gz |
29 |
>>>>-rw-r--r-- 1 root root 2731412 Aug 13 00:10 backup.tar.lzma |
30 |
>>>>-rw-r--r-- 1 root root 5125474 Aug 13 00:16 backup.tar.lzop |
31 |
>>>> |
32 |
>>>>What you're seeing are the results of compressing /lib on my gentoo |
33 |
>>>>powered laptop. I've not bothered with timing the processes as the better |
34 |
>>>>compression rates are at the cost of speed and memory usage. Not good for |
35 |
>>>>"while you wait" processing, but just plain perfect for backups and |
36 |
>>>>what-have-you on servers... One side note, 7za does not record user/group |
37 |
>>>>info... |
38 |
>>>> |
39 |
>>>> |
40 |
>>>Are you saying it removes user/group info from the tar file? |
41 |
>>> |
42 |
>>> |
43 |
>>> |
44 |
>>Not "removed", it's never put there... :') |
45 |
>> |
46 |
>> |
47 |
> |
48 |
> |
49 |
>I'm sorry but how do you create a tar file without preserving the |
50 |
>usernames and permissions? |
51 |
> |
52 |
> |
53 |
> |
54 |
|
55 |
This may be a case of a different paradigm being used by 7-zip than that |
56 |
used by traditional (*nix) compression tools. If my memory serves me, |
57 |
the 7-zip format is very similar to the pkzip format in its usage. By |
58 |
that I mean that one is not required to make a tarball before |
59 |
compressing multiple files. The format allows you to skip the tar step |
60 |
and make an archive consisting of whichever files and directories you wish. |
61 |
|
62 |
The problem, I'm guessing, is that the 7-zip archive format was |
63 |
developed in the Windows world where users and groups and permissions |
64 |
have no meaning (I think that has changed or is changing in the NT/XP |
65 |
world, but I don't know and don't especially care). Hence, these |
66 |
attributes aren't accomodated by this format. I assume the 7-zip |
67 |
extractor program sets the user and group of the extracted files to that |
68 |
of whomever extracts them. |
69 |
|
70 |
What everyone has rightly pointed out, namely that you can make a |
71 |
tarball and then compress that, is exactly right. That IS how one would |
72 |
use 7-zip with a proper operating system. |
73 |
|
74 |
The original poster most likely used the 7-zip archiver as a stand-alone |
75 |
tool, rather than using it in conjunction with tar. This is not |
76 |
altogether surprising as one typically compresses a directory with a |
77 |
single tar command (and an implied pipe) rather than explicitly piping |
78 |
the output of tar to the compression utility. Since there is no --7-zip |
79 |
switch in tar, the OP couldn't simply 'tar -7cf backup.tar.7zip lib/'. |
80 |
The OP probably simply 7-zipped his directory without tarring it first |
81 |
and consequently ran into the limitations of the archive format. |
82 |
|
83 |
-- |
84 |
gentoo-user@g.o mailing list |