Posts

Showing posts from March, 2011

Me :)

Image

Find duplicate files on linux server

find -not -empty -type f -printf “%s\n” | sort -rn | uniq -d | xargs -I{} -n1 find -type f -size {}c -print0 | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate OR  fdupes -r ./folder > duplicates_list.txt

Linux server - memory usage by process group.

 ps aux | awk '{print $4"\t"$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr