Buscar grandes archivos en la CLI en Linux y borrar caché en ArchLinux.
sudo du -aBm / 2>/dev/null | sort -nr | head -n 10
-
To find the largest files in a directory, use:
du -ah /directory/name | sort -rn | head -n 10. -
To find all files over 500 MB, use:
sudo find / -type f -size +500M -ls.
Para limpiar caché en ArchLinux.
sudo pacman -Scc && yay -Scc
Buscar archivos más grandes que 500 megas.
find . -type f -size +500M -printf "%s %p\n" | sort -nr | head -n 10
Busca archivos >500MB y los lista con detalles humanos ordenados por tamaño
find . -type f -size +500M -exec ls -lh {} + | sort -k5,5 -h -r | head -n 10