need help on unix

Tim Evans tkevans at oss670.UUCP
Wed Jun 12 01:51:14 AEST 1991


wangf at unixg.ubc.ca (Frank Wang) writes:

>Does anyone out there know how to delete the first few lines or the last 
>few lines from a file without evoke a editor?  The reason is the file is
>too large to be edited.  

Deleting First Few Lines:

Use 'tail -nnn' (where 'nnn' is the number of lines in the file *minus* the
number of lines at the beginning you want to delete), with output re-
directed to another file.

Deleting Last Few Lines:

Use 'head' instead of tail

Bad News:

Unfortunately, not all UNIX's have both 'head' and 'tail'
-- 
INTERNET	tkevans at Soaf1.ssa.gov   PHONE:  (301) 965-3286
UUCP 		...!{rutgers|ames|uunet}!mimsy!woodb!tkevans
US MAIL		6401 Security Blvd, 2-Q-2 Operations, Baltimore, MD  21235	



More information about the Comp.unix.questions mailing list