Let's face it, we are mere mortals that keep forgetting everytime we learn something new. So that's why I created this simple cheatsheet. Every time I forget something important, I want to refer back in one single place instead of scouring the Internet for the same answer that I did before. Hope this will help.
df -h | awk '/^C:\\/ {print $3 "/" $2}'
df -h -t ext4 -t xfs | awk '{print $1, $3 "/" $2}' | column -t
free -h | awk '/^Mem:/ {print $3 "/" $2}'
find . -printf '%s %p\n'| sort -nr | head -10
du -hsx * | sort -rh | head -10
ip a show scope global dynamic | awk '$1 == "inet" {print $2, $4}'
ps axch -o cmd:15,%mem --sort=-%mem
ps axch -o cmd:15,%cpu --sort=-%cpu
apt-mark showmanual
echo $PATH | tr : \\n
sed 's/"//g'
sed 's/[^ ]* //'
sed 's/,$//'
sed -e 's/\[[^][]*\]//g'
sed 's/,/ /g'
awk '{print $0}'
awk '(NR>1)'
awk 'NF'
awk '{$1=$1};1
awk 'NR==2{ print; }'
grep -oP '\[\K[^\]]+'
grep -m1 'searchstring' file_name
curl -4 https://icanhazip.com
systemctl list-unit-files --state=enabled --no-pager
ffmpeg -i video_name.mp4 -i audio_name.m4a -c copy -map 0:v -map 1:a output_name.mp4
youtube-dl --extract-audio --audio-format mp3 https://ytvideolink
nmap -sC -sV -p- -oN output-name ip-address
nmap --script=http-enum -p80 ip-address
Search name of the hidden directory on the web server with wordlist.
gobuster dir -u http://ip-address -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt
enum4linux -M -G -S ip-address
smbclient //ip-address/Anonymous
hydra -l ssh-username -P /usr/share/wordlists/rockyou.txt ssh://ip-address