在使用群晖NAS、Linux服务器时,经常需要搜索某个文件以进行处理,此时需要登录服务器后台运行命令。
查找文件的常见命令如下:
find命令:
- 查找文件:find 目录名 -name 文件名
如:在 dir1 下查找文件名为 abc 的文件或目录 find dir1 -name abc
- 查找目录:find 目标目录 -type d 要查找的目录名称
参考资料:
- https://www.cnblogs.com/zhangmo/p/3571735.html
- https://www.cnblogs.com/bigbean/p/3669739.html
- https://blog.csdn.net/xxmonstor/article/details/80507769