Sort by du in Linux and bulk remove logs

Sort by the following, and you will get the largest folders in the bottom of the list:
du -h * | sort -h

Bulk delete the files by rm command, for example:
rm -rf /opt/apache-tomcat-8.5.23/logs/localhost.2018-*

Kommentarer