xia*_*jie 3 command-line bash scripts compiling compiz
我想compiz
用我的大脑和双手解决一些问题。
顺便说一句,我输入了以下命令以compiz
在 Ubuntu 12.04 中从源代码构建
find /opt/compiz-built/share/gconf/schemas -exec gconftool-2 --install-schema-file={};
Run Code Online (Sandbox Code Playgroud)
我在http://www.brazzi64.net/blog/building-compiz-from-source-in-ubuntu-12-04/提到了那个命令
并显示以下消息。
如何-exec
在 find 命令中使用选项,我想这是我的错误。
您快到了。你需要\;
在最后让 find 知道命令的结尾在哪里。
find /opt/compiz-built/share/gconf/schemas -exec gconftool-2 --install-schema-file={} \;
Run Code Online (Sandbox Code Playgroud)
对于一次可以使用多个参数的命令(例如,如果您只想stat
使用每个文件名),您可以\+
改用。这将构建一个复合参数,它可以更快地执行,因为它不会为每个文件分叉:
find . -exec stat {} \+
Run Code Online (Sandbox Code Playgroud)
不过,这不适用于您的示例。
只是一个测试工具来突出不需要引号:
$ mkdir 1 2 1\ 2 # makes three directories
$ touch {1,2}/single # puts a file in each of the two singles
$ touch 1\ 2/COMBO # puts a file in the dir with a space
$ find -type d -exec ls {} \;
1 1 2 2
single
single
COMBO
Run Code Online (Sandbox Code Playgroud)
如果它不为我们处理报价,我们会看到这个而不是 COMBO:
1:
correct
2:
correct
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
8559 次 |
最近记录: |