How to Find Biggest Files and Directories in Linux?

 

du -a /home | sort -n -r | head -n 5
 
  1. du command: Estimate file space usage.
  2. a : Displays all files and folders.
  3. sort command : Sort lines of text files.
  4. -n : Compare according to string numerical value.
  5. -r : Reverse the result of comparisons.
  6. head : Output the first part of files.
  7. -n : Print the first ‘n’ lines. (In our case, We displayed first 5 lines).

How to Find Biggest Files ONLY in Linux?

find /home  -xdev -type f -size +100M -exec du -sh {} ';' | sort -rh | head -n 3








-size  : above command will check the size of file>+100mb so it will  reduce the time to get output

messeges and dmesg?



/var/log/messages   :maintain the general system activity logs and  

/var/log/dmesg        :maintains only the kernel logs.



system performance (Ram,processor utilisation) monitoring  @given time???





 

0 comments:

Post a Comment

Popular Posts

Recent Posts

Unordered List

Categories

Text Widget

Powered by Blogger.

Home - PageNavi (show/hide)

Ads

Pages