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

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

WBOY
WBOYOriginal
2016-07-12 09:02:16954browse

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

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

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

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

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1086212.htmlTechArticle清空文件的内容 和 统计文件的大小的命令,清空统计 清空文件的内容: true 文件名 (或 echo 文件名) 统计文件的大小: du -h --max-depth=...
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