Da hilft mal wieder die gute alte Qshell:

head - Copy the first part of files
Synopsis
head [-n
count] [file ...]

Description
The
head utility displays the first count lines of each of the specified files, or of standard input if no files
are specified. If
-n is not specified, then the first 10 lines of the file are displayed.
If more than one
file is specified, each file is preceded by a header consisting of the string ==> XXX <==

where XXX is the name of the file.
Options
-n
Display count number of lines.

Beispiel:

qsh cmd('cd /Home/mydir;head -n1000 myfile >my1000file')