find / -name 'jack' -exec ls -l {} \;
时间: 2024-05-29 14:10:14 浏览: 15
This command will search for all files and directories named 'jack' starting from the root directory ('/') and then execute the 'ls -l' command on each file or directory found. The '{}' represents the file or directory found and the '\;' signifies the end of the command to be executed.
相关问题
find / -name nginx.conf 权限不够
如果您在执行"find / -name nginx.conf"命令时出现权限不够的错误,这可能是由于您当前的用户没有足够的权限来搜索整个文件系统。您可以尝试以下几种方法来解决这个问题:
1. 使用root权限执行命令:尝试使用sudo或su命令以root用户身份执行命令,这样您将具有足够的权限来搜索整个文件系统。例如,可以尝试执行以下命令:sudo find / -name nginx.conf
2. 限定搜索范围:如果您知道nginx.conf文件可能位于特定目录中,您可以直接指定该目录进行搜索,而不是搜索整个文件系统。例如,如果您怀疑nginx.conf位于/etc/nginx目录下,您可以执行以下命令:find /etc/nginx -name nginx.conf
3. 检查当前用户权限:确保您当前的用户具有足够的权限来执行该命令。可以使用ls命令检查该文件的权限是否允许您执行操作。例如,可以执行以下命令:ls -l /path/to/nginx.conf
请注意,根据您的特定情况可能需要调整上述方法中的命令和路径。
find / -name
需要补充完整的命令,`find / -name` 后面需要加上要查找的文件名或通配符,例如 `find / -name myfile.txt` 或 `find / -name *.txt`。这个命令的作用是在根目录下查找文件名为 `myfile.txt` 或以 `.txt` 结尾的文件,并输出它们的路径。如果要查找整个文件系统,则需要使用管理员权限运行该命令。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)