1、查看当前文件夹占用空间
du -ah --max-depth=1
2、centos 安装字体
fc-list 查看已安装字体
如果提示命令不存在,执行下边命令安装fontconfig
yum -y install fontconfig
安装完成,会多下边两个目录
/usr/shared/fonts
/usr/shared/fontconfig
在/usr/shared/fonts新建目录chinese,把字体文件*.ttf、*.ttc放进/usr/shared/fonts/chinese
更改chinese目录权限
chmod -R 755 /usr/share/fonts/chinese
修改字体配置文件
vi /etc/fonts/fonts.conf
<dir>/usr/share/fonts</dir>
<dir>/usr/share/X11/fonts/Type1</dir>
<dir>/usr/share/X11/fonts/TTF</dir>
<dir>/usr/local/share/fonts</dir>
<dir prefix="xdg">fonts</dir>
<dir>~/.fonts</dir>
<dir>/usr/share/fonts/chinese</dir> <!-- 新添加的中文字体 -->
不需要重启,执行下边命令刷新缓存
fc-cache
再次执行fc-list看一下字体列表
3、时间自动同步
查看时间:date
使用date -s修改时间:date -s "2019/4/4 11:26"
安装ntpdate
yum install ntpdate -y
同步网络时间
ntpdate ntp1.aliyun.com
设置crontab同步时间
59 23 * * * ntpdate ntp1.aliyun.com
4、批量关闭进程
ps -ef | grep xxname | grep -v grep | awk '{print $2}' | xargs kill -9
5、批量删除文件
批量删除“app-202203”开头的目录和文件
rm -rf app-202203*
批量删除“app-202204”和“app-202205”开头的目录和文件
rm -rf app-2022{04,05}*