文件名称:武汉大学计算机学院 陈刚 unix
文件大小:8KB
文件格式:RAR
更新时间:2021-07-21 15:41:56
武汉大学 计算机学院
NAME tcp —trivially copy a file SYNOPSIS tcp source target DESCRIPTION The tcp utility copies the contents of the source to target. If target is a directory, tcp will copy source into this directory. EXAMPLES The following examples show common usage: tcp file1 file2 tcp file1 dir tcp file1 dir/file2 tcp file1 dir/subdir/subsubdir/file2 EXIT STATUS tcp exits 0 on success, and >0 if an error occurred. SEE ALSO tcpm(1), lseek(2), read(2), write(2) NOTES The code for the tcp utility is, of course, well-formatted and can be compiled using the -Wall flags without any errors or warnings. NAME tcpm—trivially copy a file via mmap/memcpy SYNOPSIS tcpm source target DESCRIPTION The tcpm utility copies the contents of the source to target. That is, behaves entirely the same as tcp(1). Unlike tcp(1), tcpm uses mmap(2) and memcpy(2) instead of read(2) and write(2), which is why it can be rewarded with up to 10 extra credit points. EXAMPLES The following examples show common usage: tcpm file1 file2 tcpm file1 dir tcpm file1 dir/file2 tcpm file1 dir/subdir/subsubdir/file2 EXIT STATUS tcpm exits 0 on success, and >0 if an error occurred. SEE ALSO tcp(1),lseek(2),mmap(2),memcpy(2) NOTES The code for the tcpm utility is, of course, well-formatted and can be compiled using the -Wall flags without any errors or warnings.
【文件预览】:
2016302580022_柳庭瑜
----tcp.c(1KB)
----tcpm.c(2KB)
----tcp(9KB)
----tcpm(13KB)