在Linux中,你可以使用find
命令来快速查找文件。以下是一些常用的find
命令选项和用法:
find [路径] [表达式]
find /path/to/directory
find /path/to/directory -type f -name "*.txt"
find /path/to/directory -type f -size +1M
find /path/to/directory -type f -perm -r
find /path/to/directory -type f -mtime -1
find /path/to/directory -type f -user user1
find /path/to/directory -type f -name "*.log" -exec rm {} \;
find /path/to/directory -type f -name "*.jpg" -exec display {} \;
这些只是find
命令的一些基本用法,你可以根据需要组合不同的选项和表达式来实现更复杂的查找任务。要了解更多关于find
命令的信息,请查阅其手册页(通过运行man find
)。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:linux命令怎样快速查找文件