tail print the last part of input.
How do you print the first part, say first 10 lines?
Daniel
Daniel
'man head'Quote:> tail print the last part of input.
> How do you print the first part, say first 10 lines?
Michael Heiming
heh.. Sorry, couldn't resist.
--
Kind Regards,
Gareth Williams
> > tail print the last part of input.
> > How do you print the first part, say first 10 lines?
> 'man head'
> Michael Heiming
"See also:"
This is one of the best ways to locate related commands.
--
Bill 'shortsig' Hassell, HP Remote Engineering Services
1. hairy tail (was Re: tail -f & RAM disk device driver wanted)
-----BEGIN PGP SIGNED MESSAGE-----
Gawain> I have successfully implemented tail -f functionality by
Gawain> detecting file size changes using stat(). If the file size
Gawain> has changed I do whatever I want to do, if it has not changed
Gawain> I just sleep(1).
Gawain> This actually works quite well and is not CPU intensive at all
Gawain> - in fact it seems LESS CPU intensive then whatever "tail -f"
Gawain> is doing!!
Martin> That is all fine and dandy, but you can only read from regular
Martin> files (or maybe pipes as well?) that way. Try to read from a
Martin> character device, and you loose[sic]. (I think that this can make
Martin> quite a lot of sense at times.)
Well the solution is a "hairy" tail (hmm ;-) which checks whether it
is an ordinary file or a device at the start, and has a read-loop of
each type.
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface
iQB1AwUBMUbAmedsuUurvcRtAQE6gwMAv+wD6OKTUi3eJjeBqaUxIC/s088z0YDX
Urcbt86L5aRqgmPz8PUqU+59kVkQgEIKp9MI3NzavrgsIF5iX2o0t8R2snpu4G4E
G9roeaMW8u6T03yi+46DdeNEvw62FUq4
=hZjq
-----END PGP SIGNATURE-----
--
APM Ltd., Poseidon House, Castle Park, Cambridge CB3 0RD
2. PAO installed, need mouse help
3. non-static buffer tail (was Re: `tail' limitation)
9. file mapping of memory (opposite of mmap())
10. can internet gateway be on opposite side of a tunnel?
11. Is there a program the opposite of rawrite
12. Could term run in the opposite way?