[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: truncate utility (not split)



On 11 Mar 2002 13:25:06 -0800
Caleb Shay <caleb@webninja.com> wrote:

> Seems to me that you should be able to do this with dd.

You're absolutely right. Reminds me of someone's Linux motto: You want
it, you have it.

> On Mon, 2002-03-11 at 11:59, csj wrote:
> > Is there a utility to truncate files such that a single smaller piece or
> > no more than two pieces are produced? Something like:
> > 
> > (1) original_file -> small_chunk (bigger_2nd_chunk discarded)
> > (2) original_file -> (smaller_1st_chunk discarded) big_chunk
> > (3) original_file -> small_chunk + big_chunk
> > 
> > split would be suboptimal, especially in scenarios (2) and (3)::
> > 
> > original_file -> small_chunk_1 + small_chunk_2 + small_chunk_n
> > delete small_chunk_2 small_chunk_2
> > concatenate small_chunk_*
> > 
> > Hope you understand what I means. TIA



Reply to: