[Linux]命令查找一个文件

因为找一个之前写的一个脚本文件init.sh

使用命令:(从根目录开始搜索所有命名为init.sh的文件)

find / -name init.sh -type f -print 

输出效果:

find: ‘/proc/3101/ns’: Permission denied
find: ‘/proc/3105/task/3105/fd’: Permission denied
find: ‘/proc/3105/task/3105/fdinfo’: Permission denied
find: ‘/proc/3105/task/3105/ns’: Permission denied
find: ‘/proc/3105/fd’: Permission denied
find: ‘/proc/3105/map_files’: Permission denied
find: ‘/proc/3105/fdinfo’: Permission denied
find: ‘/proc/3105/ns’: Permission denied
find: ‘/boot/efi’: Permission denied
/home/chenhanxuan/QtProjects/Tutorials/init.sh
find: ‘/home/chenhanxuan/.cache/dconf’: Permission denied
find: ‘/root’: Permission denied
find: ‘/lost+found’: Permission denied

找到了对应的路径并将其路径输出,再使用cd命令即可切换到对应的路径

上一篇:Vue+tracking.js 实现前端人脸检测


下一篇:连接MySQL数据库出现错误:Access denied for user 'root'@'localhost' (using password:YES)