惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
小众软件
小众软件
GbyAI
GbyAI
酷 壳 – CoolShell
酷 壳 – CoolShell
F
Fortinet All Blogs
博客园 - 三生石上(FineUI控件)
B
Blog
量子位
B
Blog RSS Feed
Vercel News
Vercel News
Blog — PlanetScale
Blog — PlanetScale
Last Week in AI
Last Week in AI
博客园 - 叶小钗
MongoDB | Blog
MongoDB | Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
爱范儿
爱范儿
Jina AI
Jina AI
C
Check Point Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
IT之家
IT之家
H
Hackread – Cybersecurity News, Data Breaches, AI and More
云风的 BLOG
云风的 BLOG

博客园 - 李文学

Windows Server 2016 64位 ASP+Access(.mdb) 80004005 最简解决方案 Oracle查询表中指定库名,表约束名的上下表依赖关系 linux简版启动,关闭jar命令 Oracle11.2实例重启 主流数据库 “匹配更新、不匹配插入” 语法详解(Oracle/MSSQL/MySQL) Centos7扩容2 wps,两个页签比较常用函数 Oracle常见SQL示例 VUE-手机号验证 Centos7安装mysql8 Centos7安装ffmpeg 不同数据库标识长度检查 Centos7重置网络 Centos7磁盘空间自动处理 Oracle11新建业务库账号信息 Java启动JAR,.sh版 centos7防火墙IP白名单维护 centos7安装lamp,php5.6,mysql5.7,xdebug MSSQL最大内存设置
linux常用命令
李文学 · 2025-08-20 · via 博客园 - 李文学
查询当前目录下文件夹较大的文件夹,并排序,展示前10条记录
du -h --max-depth=1 | sort -hr | head -n 10
删除指定目录下以.log结尾的日志文件,删除日期为当前360天前 find
/home/tjgeo/logs/njdb/ -name "*.log*" -type f -mtime +360 -delete
find /home/tjgeo/logs/njdb/ -name "*.txt*" -type f -mtime +360 -delete
# 先预览符合条件的目录(推荐先执行此步骤确认) 
find
/home/tjgeo/logs/njdb-run/ -maxdepth 1 -type d -regextype posix-egrep -regex '.*/[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])' -mtime +360 -print

# 确认无误后执行删除(谨慎操作,此命令不可逆)
find

/home/tjgeo/logs/njdb-run/ -maxdepth 1 -type d -regextype posix-egrep -regex '.*/[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])' -mtime +360 -exec rm -rf {} +

# 查看删除成果
find /home/tjgeo/logs/njdb-run/ -maxdepth 1 -type d -regextype posix-egrep -regex '.*/[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])' -mtime +360 -print