linux ls - ghdrako/doc_snipets GitHub Wiki
Sortowanie po czasie
ls -lt # sorteby by time
ls -ltr # reversed
ls -ltr | awk '{print $(NF-2), $(NF-1), $NF}' # wyswietlenie daty czasu i nazwy pliku
Sortowani po rozmiarze
ls -lhS
-l
→ listowanie w długim formacie (rozmiar, data, prawa itp.)-h
→ "human-readable", czyli rozmiary w KB, MB, GB-S
→ sortowanie według rozmiaru (malejąco)
find . -maxdepth 1 -type f -exec ls -lh {} + | sort -k5 -h -r
du -ah . | sort -rh