• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

CHANGELOGH A D16-Feb-200181 74

COPYINGH A D11-Feb-200117.6 KiB341281

MakefileH A D03-May-2022324 199

READMEH A D11-Feb-20012 KiB5039

granulate.cH A D31-Jul-20018.2 KiB289164

README

1	*********
2	GRANULATE
3	*********
4
5Usage: granulate seg_size in_file outfile_prefix
6
7Granulate is a program for splitting files in place.  The program serves a
8purpose similar to the standard UNIX split, but differs in one important way.
9For split to operate on a 40MB file, you must have more than 40MB of free
10space on the disk.  On the other hand, granulate only needs one chunk of free
11space on the hard drive, where a chunk is the requested size for the output
12files.
13
14EXAMPLE:
15	You want to to split a 500MB file an put it on 100MB zip disks.
16	You have only 65MB free on your hard disk.
17	Split can't do it.
18	Granulate will do it like this:
19		granulate 10000000 <input_file> <outfile_prefix>
20	You will end up with 50 files, all 10MB. (approximately)
21	Reassembly works the same as for regular UNIX split.
22
23NOTE: There is overhead associated with each file on a filesystem.  For
24example, storing 2000 files of size one byte requires much more disk space
25than storing one file of 2000 bytes.  This means that making seg_size
26smaller than a few KB is probably counterproductive.
27
28TODO:
29	Perhaps it would be nice to make the maximum disk usage be the same
30as the size of the input file (plus fs overhead).  This could be done by
31copying the segment to RAM, then truncating in_file, then writing to
32out_file.  This might not work well on machines with little RAM, but
33seems like a worthwhile option, at least.
34
35	The syntax and semantics should more closely resemble GNU split.
36
37	Granulate could help the user plan how to split the file by optimizing
38seg_size with respect to filesystem overhead and rigid user constraints.
39
40	Maybe the functionality of granulate should be merged into the standard
41GNU textutils distribution of split.  Maybe it should be a patch against
42GNU split.  In any case, the way GNU split was written does not lend
43itself to the type of operations that granulate does.  It might be a
44really ugly hack.
45
46BUGS: Please tell me about bugs so I can fix them.
47
48AUTHOR: Kurt Rosenfeld
49		hardware@cyberspace.org
50