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

WBOY
Release: 2016-06-13 12:28:10
Original
774 people have browsed it

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

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

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

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template