0

How to find directories and large files in Linux?

Asked 3 years ago (May 12, 2021) in the field of Operating Systems by Austin.B

Hi, i need to search for large files and directories. For example the files over 100GB. Thank you for sending me the solution.


Answers


0
Answered 3 years ago (May 14, 2021) by Eldernode Staff

To find bulk directories, run the following command:

du -ah /home | sort -rh | head -10

Run the following command to find large files:

find /home -type f -exec du -Sh {} + | sort -rh | head -n 10

To find files larger than 100 MB, run the following command:

find /home -xdev -type f -size +100M

Execute the following command to display the list of files in a directory:

ls -lhtS /var/log/

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day