Unix Shell - Re: Useful use of cat

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > January 2006 > Re: Useful use of cat





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Useful use of cat
Michael Tosch

2006-01-05, 6:08 pm

Henry Townsend wrote:
> Kevin Collins wrote:
>
>
>
> Possibly. There are three programs potentially involved here (cat, gzip,
> and the shell). Thus "gzip largefile" will fail if gzip doesn't know how
> to open large files[*], "gzip <largefile" will fail _only_ if the shell
> doesn't know how to open large files, and "cat largefile | gzip" will
> only help if both gzip and your shell are broken and cat is not. I'd be
> interested to see a system where this is the case. I can believe
> (versions of) gzip being broken for large files but have trouble
> imagining a system where cat had been fixed up and the shells hadn't.
> Not to mention that if your shell can't handle large files, where are
> you going to write the gzip/zcat output to?
>
> [*] Basically a matter of passing O_LARGEFILE to open().


So true!
The answer to your question can only be:

cat largefile | gzip | dd of=largefile.gz

provided that dd is largefile capable.


--
Michael Tosch @ hp : com
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com