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

推荐订阅源

Last Week in AI
Last Week in AI
D
DataBreaches.Net
腾讯CDC
Recent Announcements
Recent Announcements
有赞技术团队
有赞技术团队
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
云风的 BLOG
云风的 BLOG
罗磊的独立博客
月光博客
月光博客
MyScale Blog
MyScale Blog
U
Unit 42
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
G
Google Developers Blog
博客园 - 【当耐特】
D
Docker
I
InfoQ
雷峰网
雷峰网

博客园 - 李文学

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