问个人类学的问题# Living
w*s
1 楼
implement linux command tail.
We will focus only on "-n" and "-f" options.
tail FILE 是显示打印文件最后10行。tail -n 5表示打印文件最后五行。
The -f option causes tail to not stop when end of file is
reached, but rather to wait for additional data to be appended
to
the input.
有两个concern,
文件可能很大,所以不能全部读入,问怎么解决。
文件可能大得超过了内存,问怎么读。
(2) Two cases for value of N (A) N is small to fit in memory (B) N is large
to fit in memory
Please email your code and clear instructions to execute your program.
We will focus only on "-n" and "-f" options.
tail FILE 是显示打印文件最后10行。tail -n 5表示打印文件最后五行。
The -f option causes tail to not stop when end of file is
reached, but rather to wait for additional data to be appended
to
the input.
有两个concern,
文件可能很大,所以不能全部读入,问怎么解决。
文件可能大得超过了内存,问怎么读。
(2) Two cases for value of N (A) N is small to fit in memory (B) N is large
to fit in memory
Please email your code and clear instructions to execute your program.