How to find large files in the system:
1. Count the file (or folder) Size of the current directory and sort the files in ascending order.Du-s/home/* | sort-nr*-H the readable format shows the size of the specified directory or file
* The-s option specifies that the size of each subdirectory or file is not displayed in detail for the directory. 2. Search for files larger than MB and display details.Find.-type f-size + 100 M-exec ls-lh {}\;The find action can be-print, which is output by default.
-Ls: displays the detailed information of the searched file.
-OK COMMAND \; to confirm
-Exec COMMAND \; where COMMAND is the COMMAND to operate on the file, use {} to replace the searched file; "\;" is the end of-exec, is a fixed format. This action can be replaced by the xargs command, that is, the result is sent to the xargs command through the pipeline, and the file to be operated is represented.
Reference: 1. find, a powerful file search tool in Linux, provides a detailed description of the find command, which can be used as a reference for future use.
2. Linux provides detailed command introduction for finding out the summary of large files, and finally provides two different methods for searching large files.