[paranoia] splitting sound files?

Ralph Corderoy ralph at inputplus.demon.co.uk
Fri Feb 16 03:56:16 PST 2001



Hi Wolfgang,

> > If your head and tail prefer text files then use dd(1).
> >
> >     dd if=big.raw of=part0.raw bs=1024k skip=0 count=1
> >     dd if=big.raw of=part1.raw bs=1024k skip=1 count=1
> >     dd if=big.raw of=part2.raw bs=1024k skip=2 count=1
> >     ...
> 
> This can get SLOW for large values of skip, since (at least some
> versions of) dd read through the whole 'skip' part instead of
> skipping to the part that matters.

True, the number of reads is O(n**2), but if N is relatively small that
doesn't matter.  Unfortunately, it doesn't help the original questioner
since it turned out they wanted a `small amount of disc space' solution
for which a `slice the end off and truncate' method is better.

> But then there's always 'man split'.

And just as for some versions of dd(1), some versions of split(1) don't
work on non-text files.  :-(

Ralph.

--- >8 ----
List archives:  http://www.xiph.org/archives/
Paranoia homepage: http://www.xiph.org/paranoia/
To unsubscribe from this list, send a message to 'paranoia-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Paranoia mailing list