Tag: one-liner

  • Kubernetes – Delete All Completed Jobs One-Liner

    Kubernetes – Delete All Completed Jobs One-Liner

    Sometimes you forget, or don’t want to add, successfulJobsHistoryLimit or event perhaps failedJobsHistoryLimit. Whatever the case, the end result looks something like this: You can of course go and kubectl delete all of them, but a much quicker solution is using this one-liner: Running the above one-line will list all the jobs in the default…

  • MySQL – Calculating Disk Usage Per Database

    MySQL – Calculating Disk Usage Per Database

    The answer usually lies within /var/lib/mysql/[DATABASE]. But the answer can also be found in, you guessed it, information_schema! 😀 Here’s an one-liner for you, that displays database sizes in megabytes (nice long float() included) If gigabytes are more your thing, run the following: Example output: Query on 👾

  • How To: Linux – View Squid Proxy’s Active Cache Store

    Ever wanted to see whats going through Squid’s cache right at the moment? But get immediately discouraged with all the timestamps, SWAPOUT, RELEASE and other cache variables? I have a one-line for you! ~ # tail -f /var/log/squid/store.log|grep -oE ‘\b(http?)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]’ This will print out visited links that passes by squid in real time, it can…