Clear the contents of the file: true File name (or echo file name) Statistics file size: du -h --max-depth=1 /usr/local/nginx/logs/* (* means in the logs folder All files) Statistics folder size: du -sh folder
Clear the contents of the file: true > file name (or echo “” > file name)
Statistical file size: du -h --max-depth=1 /usr/local/nginx/logs/* (* indicates all files in the logs folder)
Statistics folder size: du -sh folder