1、如查询:run目录下全部大于50M的文件文件。
find /run/ -type f -name "*.*" -size +50M -exec du -h {} \;
2、如果发现超大的.log文件可以置空。如:access.log过大。可以通过以下方式空置文件。
echo /dev/null > access.log
1、如查询:run目录下全部大于50M的文件文件。
find /run/ -type f -name "*.*" -size +50M -exec du -h {} \;
2、如果发现超大的.log文件可以置空。如:access.log过大。可以通过以下方式空置文件。
echo /dev/null > access.log