tail:
tail [options] files
print the last few lines of one or more files,when more than one file is specified, a header is printed at the beginning of each file and each is listed in succession
parameters -c n the option print the last n bytes,if n is followed by k or m,the last n kilobytes or megabytes.respectively -f follow the output dynamically as new lines are added to the bottom of a file -n m ;print last lines,the default is 10
head
syntax head [options] files print the first few lines of one or more files(the "head"of the file or files).when more than one file is specified.a header is printed at the beginning of each file,and each file is listed in succession
parameter -c n,-l n -c n ;print the first n bytes,if n is followed by k or m,print the first n kilobytes or megabytes -n m ;print the first n lines,stitution the default is 10
example: ls -ult|head -5
ls -ult|tail -6
head -n 12 file1