[英]Insert pwd on exec command
When i run this commannd: find. -name "*.sh" -exec ls -ltrh {};
当我运行此命令时:
find. -name "*.sh" -exec ls -ltrh {};
find. -name "*.sh" -exec ls -ltrh {};
, i have this output: ,我有这个 output:
-rw-r--r-- 1 root root 7.0K Jun 24 19:37 ./ubuntu.sh
-rw-r--r-- 1 root root 6.8K Jun 24 19:35 ./centos.sh
I want to insert the pwd command to see where is location of ubuntu and centos.sh.我想插入 pwd 命令来查看 ubuntu 和 centos.sh 的位置在哪里。 I want to know how to solve tthis problem
我想知道如何解决这个问题
find \`pwd\` -name "*.sh" -exec ls -ltrh {} \\;
Should do it.应该做的。 That's backquotes around pwd.
那是 pwd 周围的反引号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.