在Debian系统中,你可以使用find
命令来快速查找文件。find
命令非常强大,可以根据文件名、大小、修改时间等多种条件进行搜索。以下是一些常用的find
命令示例:
filename.txt
的文件:find . -type f -name "filename.txt"
/home/username
)及其子目录中查找名为filename.txt
的文件:find /home/username -type f -name "filename.txt"
.txt
结尾的文件:find . -type f -name "*.txt"
/home/username
)及其子目录中查找所有以.txt
结尾的文件:find /home/username -type f -name "*.txt"
find . -type f -exec ls -lt {} \;
/home/username
)及其子目录中查找大于1MB的文件:find /home/username -type f -size +1M
你可以根据需要组合不同的选项来定制find
命令。要了解更多关于find
命令的信息,请查阅其手册页:
man find