From c9baa1f90576e851dd1974d04fc58524fd3d2641 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Tue, 1 Jul 2025 13:47:49 +0200 Subject: [PATCH] Config/Navi: Add more cheats --- config/navi/christoph.cheat | 53 ++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/config/navi/christoph.cheat b/config/navi/christoph.cheat index 70f02385..dba78406 100644 --- a/config/navi/christoph.cheat +++ b/config/navi/christoph.cheat @@ -22,6 +22,36 @@ $ executable: bash -c "compgen -c" ldd $(readlink -f $(which )) $ executable: bash -c "compgen -c" +; =========================== +; SYSTEMD +; =========================== + +% systemd +# List failed system units +sudo systemctl --failed + +% systemd +# List failed user units +systemctl --user --failed + +% systemd +# List system errors +sudo journalctl -p 3 -xb + +% systemd +# List kernel errors +sudo journalctl -p 3 -xb -k + +% systemd +# List system unit errors +sudo journalctl -xb --unit= +$ unit: sudo systemctl list-units --type=service --all --full --no-pager --legend=false --plain | awk -F' ' '{print $1}' + +% systemd +# List user unit errors +journalctl -xb --unit= +$ unit: systemctl --user list-units --type=service --all --full --no-pager --legend=false --plain | awk -F' ' '{print $1}' + ; =========================== ; SHELL ; =========================== @@ -39,12 +69,25 @@ yes "The quick brown fox jumps over the lazy dog" | head -c > for o in ; ; end % shell -# Find files under a certain size in the current directory -find . -type f -name "" -size - +# Find files larger or smaller than a specified size in the current directory +fd --type file --size -- "" . +$ mode: echo -e "+\t\tFind Larger Files\n-\t\tFind Smaller Files" --- --column 1 + +% gdu +# Visualize storage usage on all mounted disks +sudo gdu -d + +% duf +# List all mounted devices +sudo duf + +% duf +# Display INode information of all mounted devices +sudo duf -inode % awk # Select a column -awk -F '{print }' +awk -F '{print $}' $ separator: echo -e "' '\t\tWhitespace\n'[ ]'\t\tSingle Space\n'\\\t'\t\tTabs" --- --column 1 % mime @@ -67,7 +110,9 @@ $ file: eza -f -1 % code # Disassemble an object file -objdump -d -S -M intel "" | bat -l nasm +objdump -d -S -M , "" | bat -l nasm +$ arch: echo -e "x86-64\t\t64 Bit\ni386\t\t32 Bit\ni8086\t\t16 Bit" --- --column 1 +$ syntax: echo -e "intel\t\tIntel Syntax\natt\t\tAT&T Syntax" --- --column 1 $ file: eza -f -1 ; ===========================