8/12 Is there a way to combine two files without writing? I mean
unlinking the 2nd file but instead of freeing its blocks, adding them
to the end of the 1st file. Suppose gap is not an issue.
\_ Instead of asking for an answer to some obscure no-details technical
question, how about you ask us what you're actually really trying to
do and maybe we can then help you solve the real problem?
\_ Well, I want to make some kind of revision control except I
don't want to do diffs (suppose it's binary) and just want to
keep copies of old files up to a certain number (sort of like
what VMS did). As such, I don't want to read and write the
files but just chain old copies together with some control info
recorded separately. If you have a better solution I would like
to hear it, but my original question is quite well specified.
\_ How about moving the files into a special directory? I know
it's boring, but it would be easy, portable, and work.
\_ You're describing tar. Rename the old file and move it into
a tar file you've created for this purpose. Tar will append,
allow searching, has control info, allow extracting by file
name, etc, etc. Don't re-invent the wheel.
\_ Yeah it is like tar, but tar actually has to read the file
and then copy it bit by bit to another file. I want to
just append the list of data blocks of the 2nd file to
that of the 1st file before unlinking it.
\_ Why?
\_ More efficient????? You don't have to read and write
1000 50 MB files if you are not changing them. |