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