Author Topic: What is the command for finding the highest memory occupied file in Linux?  (Read 502 times)


  • Green Belt
  • *****
  • Posts: 309
  • Karma: +1/-0
du –ah / | sort –n –r | head –n 1

du – estimate file space usage
-a – write counts for all files, not just directories
-h – print sizes in human readable format (eg. 1K 234M 2G)

sort – sort lines of text files
-n – compare according to string numerical value
-r – reverse the result of comparisons

head – output the first part of files
-n – number of lines