-
Notifications
You must be signed in to change notification settings - Fork 9
Tips and Tricks for investigations
cintiadr edited this page Aug 31, 2024
·
7 revisions
$ sudo netstat -lnpt
$ sudo lsof -p <pid> | fgrep log
\n~.
as in <enter> tilde dot
# Find biggest folders
du -sh /*
# and search inside that folder
du -a /var | sort -n -r | head -n 10
# remove old kernels
apt autoremove
#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
# if /snaps folder is holding a lot of storage
# https://www.linuxuprising.com/2019/04/how-to-remove-old-snap-versions-to-free.html
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
done
Read this before updating this wiki.