|
|
发表于 2005-6-22 14:02:23
|
显示全部楼层
Post by xfmaple
问一下版主,命令行中的{}是做什么的?
我把它去掉以后,执行结果就不一样了,能说明一下其意思吗?
要学会看man手册
- -exec command {} \;
- Execute command; true if 0 status is returned. All following
- arguments to find are taken to be arguments to the command until
- an argument consisting of `;' is encountered. The string `{}'
- is replaced by the current file name being processed everywhere
- it occurs in the arguments to the command, not just in arguments
- where it is alone, as in some versions of find. Both of these
- constructions might need to be escaped (with a `\') or quoted to
- protect them from expansion by the shell. See the EXAMPLES sec-
- tion for examples of the use of the `-exec' option. The speci-
- fied command is run once for each matched file. The command is
- executed in the starting directory. There are unavoidable
- security problems surrounding use of the -exec option; you
- should use the -execdir option instead.
复制代码
当command运行时,以参数{}替代当前文件。后面跟着带一个转义分号(\;)的整个序列。 |
|