最近我收到了这个findone-liner,但我无法解释以下两者的区别从何而来:
[root@centos share]# find . -exec grep -i "madis" {} /dev/null \;
./names:Madison Randy:300:Product Development
Run Code Online (Sandbox Code Playgroud)
[root@centos share]# find . -exec grep -i "madis" {} \;
Madison Randy:300:Product Development
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,在第一个中有这个字符串派生自的特定文件,到目前为止我真的无法找出为什么会发生这种情况。
我的主桌面有 Mint 14,我从另一台计算机通过 SSH 访问它,因为 Mint 上没有屏幕。然后我尝试启动teamviewer,只是为了远程启动它的桌面会话。我启动了teamviewer,一切正常,但后来我试图从终端停止这个应用程序,结果是这样的:
x@x-pc /opt/teamviewer8 $ ps -ef | grep team
root 1567 1 0 20:55 ? 00:00:00 /opt/teamviewer8/tv_bin/teamviewerd -f
x 2892 1 0 21:41 ? 00:00:00 /opt/teamviewer8/tv_bin/wine/bin/wineserver
x 2914 2822 0 21:48 pts/0 00:00:00 grep --colour=auto team
Run Code Online (Sandbox Code Playgroud)
sudo for i in `ps -ef | grep team | awk {'print $2'} | xargs`; do kill -9 $i; done
Run Code Online (Sandbox Code Playgroud)
x-pc teamviewer8 # ps -ef | grep team
root 3003 1 0 21:50 ? 00:00:00 …Run Code Online (Sandbox Code Playgroud)