![](https://img-blog.csdnimg.cn/20190918140158853.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
每天一个Linux命令-command
每天一个Linux命令
guixue01
这个作者很懒,什么都没留下…
展开
-
简单的清理过期日志的小脚本与find命令-CentOScommand
#!/bin/shyear=`date +%Y`cd /pathfind -type f -mtime +7 -exec rm -rf {} \;#删除path目录下更改时间7天之前的日志文件find path/ -type f -mtime -7 -mtime +2 \( -name "*request*" -o -name "http_*" \) -exec ls ...原创 2020-03-17 16:19:27 · 180 阅读 · 0 评论 -
df命令-CentOScommand
df -h-h或--human-readable:以可读性较高的方式来显示信息df -hi-i或--inodes:显示inode的信息df -T-T或--print-type:显示文件系统的类型;-a或--all:包含全部的文件系统...原创 2020-03-17 16:00:50 · 271 阅读 · 0 评论 -
ls命令-CentOScommand
参数-t 指按更改时间排序,是降序如果想要升序查看可以使用tac参数将文件以行为单位反序输出:ls -t | tactac参数将文件以行为单位反序输出原创 2020-03-17 15:43:15 · 128 阅读 · 0 评论 -
free命令-CentOScommand
一、参数:1、显示单位 -b, --bytes Display the amount of memory in bytes. -k, --kilo Display the amount of memory in kilobytes. This is the default. -m, --me...原创 2020-03-15 18:12:39 · 133 阅读 · 0 评论