使用环境
CentOS7.6
文件相关
1、查找文件
find /[filePath] -name [fileName]
# eg
[root]# find / -name jdk-8u301*
/opt/jdk-8u301-linux-x64.tar.gz
2、查看当前文件夹内文件/文件夹大小
du -h --max-depth=1
# eg
[root]# du -h --max-depth=1
607M ./upload
18G ./nohup.out
3、查看文件/文件夹大小
du -h file.xxx
# eg
[root]# du -h nohup.out
12K nohup.out
4、清空正在运行的应用日志文件内容
cat /dev/null>file.log
# eg
[root]# cat /dev/null>nohup.out