因为设计执行命令是: <app> <dst_file> <src_file>,如: /.a.out test.txt new.txt代码中是将第二个文件file2写入到了第一个文件中,所以第一个文件需要写权限,第二个只需要读权限。
<app> <dst_file> <src_file>
/.a.out test.txt new.txt
file2