Port-i386 archive

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

Re: head(1)

        Hello Andrew.  I suspect tail is much more robust than head is. And,
you can do all you want with tail that you can with head by using the +
argument on the command line.  In other wirds, tail +10 works the same as
head -10.

That might help you with your current problem. Also look at split(1) to see
if that might let you slice the file up into small enough chunks to deal
with more sanely.

On Mar 31,  9:34am, Andrew Ball wrote:
} Subject: head(1)
} Hello,
} I'm currently using NetBSD/i386-4.0.1 and I need to carve up a large
} file using head(1) and tail(1).  I am unable to do that because head
} seems only able to work on files of size up to around 2 Gbytes.  I
} suspect this is because bytecnt and linecnt are "long" (presumably
} signed) integers.  I'm told that "long long" would help and I wonder
} if it's appropriate for them to be unsigned.  I found the source in
} src/usr.bin/head/head.c  I've looked at tail.c, which looks quite
} different to head.c, so I'm not sure whether it shares the same
} deficiency.  I'm not sufficiently comfortable in C, so it would help
} me if someone could fix this.
} Thanks,
}   - Andy Ball
>-- End of excerpt from Andrew Ball

Home | Main Index | Thread Index | Old Index