OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / e2compr-ancillary / original / man1 / e2compress.1
1 .\" -*- nroff -*-
2 .TH E2COMPRESS 1 "April 1997" "E2Compress Utilities"
3 .SH NAME
4 e2compress, e2decompress \- compress file in a format readable by the kernel on a Linux second extended file system
5 .SH SYNOPSIS
6 (N.B. This manual page is not up to date.  The results of `e2compress --help' are reasonably
7 correct, as is the information in the Texinfo file: *See
8 (e2compr)e2compress.)
9
10 .B e2compress
11 [
12 .B \-vf
13 ]
14 [
15 .B -m
16 algorithm_name
17 ]
18 [
19 .B -b
20 cluster_size
21 ]
22 [
23 .B -S
24 suffix
25 ]
26 .I files ...
27 .PP
28 .B e2decompress
29 [
30 .B \-vf
31 ]
32 [
33 .B -S
34 suffix
35 ]
36 .I files ...
37 .SH DESCRIPTION
38 .B e2compress
39 compresses the files directly into the format readable by the kernel
40 on a second extended file system.
41 Unlike 
42 .B chattr +c,
43 .B e2compress
44 does the compression jobs in the user space.
45 This may have some advantages.
46 .B e2compress
47 opens the file it is working on, and creates a new temporary file
48 (whose name is derived from the original file by adding 
49 .B suffix
50 (`~z~' by default)) for
51 which the automatic compression will be turned off.
52 It then reads from the input file, compresses each cluster in memory, verifies
53 the compression by decompressing to a work area and comparing with the original, 
54 and then writes the compressed data to the temporary
55 file, using the lseek() system call to create the necessary holes as it goes.
56 When it is done, automatic compression is turned on again for the
57 temporary file, and the temporary file is renamed to replace the original file.
58 .LP
59 When 
60 .B e2decompress
61 or
62 .B e2compress -d
63 is called to decompress a file,
64 we create a temporary file, remove the compression attribute, attempt to disable automatic decompression 
65 on the input file, and do decompression in user space, performing some
66 checks on the way.
67 .LP
68 Using 
69 .B e2compress
70 instead of
71 .B chattr +c
72 has some advantages.
73 The main one is that the resulting file will not be fragmented as it
74 would be with 
75 .B chattr
76 : this comes from the fact that 
77 .B e2compress
78 does not free some blocks as the kernel would do.
79 Also, the compression is done in the user space.
80 Some people may consider it is better.
81 .B e2compress 
82 is also more safe, since the compressed data is
83 immediatly checked for decompression.
84 .LP
85 One disadvantage of using 
86 .B e2compress
87 is that the original file and the temporay must coexist.
88 This may be not possible if the file system is completely full.
89 .B chattr +c
90 will work even on a completely full file system.
91 .SH OPTIONS
92 .TP
93 .I -m algorithm_name
94 Set the algorithm used for compression.
95 Valid algorithms are the same as for the
96 .B chattr
97 utility.
98 .TP
99 .I -S suffix
100 Uses the provided suffix to create the temporary file, instead of the
101 default suffix (which is `~z~').
102 .TP
103 .I -b cluster_size
104 Set the cluster size (measured in filesystem blocks) for compressed files.
105 Valid sizes are the same as for the
106 .B chattr
107 utility.
108 .TP
109 .I -c
110 Compress files.  This is the default behaviour, unless the program is
111 called under the name
112 .B e2decompress
113 .TP
114 .I -d
115 Decompress files.
116 .TP
117 .I -f
118 Force compression.  If this flag is not used, 
119 .B e2compress
120 will stop if the input file has more than one link, or if the temporary file
121 already exists.
122 If this flag is used, 
123 .B e2compress 
124 will continue.
125 No verification will be performed when you use this flag.
126 .TP
127 .I -h
128 Display a short help message.
129 .TP
130 .I -v
131 Display some statistics about clusters.
132 .SH AUTHOR
133 .B e2compress
134 was first written by Antoine de Maricourt <dumesnil@etca.fr>, and has
135 been extensively modified by Peter Moulder <reiter@netspace.net.au>.
136 .SH BUGS AND LIMITATIONS
137 This program still isn't finished -- but it's now ready enough that the author uses it
138 to compress directory trees (find DIRS -type f -print0|xargs -0 e2compress -mgzip9 -b32).
139 .LP
140 The precise behaviour of this program in certain circumstances has changed.
141 This will continue to occur until it is considered `finished' in some sense.
142 .LP
143 Any writes to the file while e2compress is in action (that is to say
144 after e2compress has read the file but before the file is replaced
145 with the compressed version) are lost.  (For decompressing, no writes
146 are possible because the NOCOMPR flag is set on the input file, which
147 prevents any other processes from having the file open.)  In both
148 cases (compressing and decompressing) the results of ,any `chmod', `chown' or
149 `touch' operation during this period` will be lost.
150 .SH AVAILABILITY
151 The latest release of this program is available from the e2compr home page,
152 <http://netspace.net.au/~reiter/e2compr/software.html#ancillary>
153 .SH SEE ALSO
154 .BR chattr (1)
155 ,
156 .BR e2ratio (1)
157
158 .BR lsattr (1)