Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
想在我的服务器上搜索特定文件并直接在 nano 中编辑它。
我试过这样,但它不会工作
find -name file.php | xargs nano $1
找到了文件,但它不会那样工作
Received SIGHUP or SIGTERM
怎么做?
如果必须使用其他命令,另一种解决方案是使用反引号。例如,它对以下内容很有用git status:
git status
nano `git status | grep modified | awk '{ print $2 }'`
或者,使用查找:
nano $(find -name file\*.php)
我找到了使用查找实习生执行功能的解决方案
# find -name file.php -exec nano {} \;