Home  >  Article  >  php教程  >  清空文件的内容 和 统计文件的大小的命令,清空统计

清空文件的内容 和 统计文件的大小的命令,清空统计

WBOY
WBOYOriginal
2016-06-13 08:48:38716browse

清空文件的内容 和 统计文件的大小的命令,清空统计

清空文件的内容:true > 文件名  (或 echo “”> 文件名) 

统计文件的大小:du -h --max-depth=1 /usr/local/nginx/logs/* (*表示logs文件夹里的所有文件)

统计文件夹的大小:du -sh 文件夹

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn