Chinaunix

标题: 求助:patch命令 [打印本页]

作者: oscarvei    时间: 2008-09-26 11:13
提示: 作者被禁止或删除 内容自动屏蔽
作者: sakulagi    时间: 2008-09-26 12:26
在patch的man page里看到这样一段:


  1. You can create a file by sending out a diff that compares /dev/null or an empty file dated the Epoch (1970-01-01 00:00:00 UTC ) to the file you want to create. This only works if the file you want to create doesn't exist already in the target directory. Conversely, you can remove a file by sending out a context diff that compares the file to be deleted with an empty file dated the Epoch. The file will be removed unless patch is conforming to POSIX and the -E or --remove-empty-files option is not given. An easy way to generate patches that create and remove files is to use GNU diff's -N or --new-file option.
复制代码

作者: sakulagi    时间: 2008-09-26 12:27
用空文件和就文件比较来达到删除文件的目的




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2