Hongmu Notes
Home Summary of pitfalls Linux command to query a large file directory on a server
Summary of pitfalls

Linux command to query a large file directory on a server

Linux command to query a large file directory on a server

You can use it. du Use the following command in your terminal to query the size of each folder in the Linux file system and identify the largest folders:

du -h / | grep '[0-9\.]\+G' | sort -rh

among, / The root directory to search in. -h The option allows the results to be displayed in a human-readable format.grep '[0-9\.]\+G' Displays only folders larger than 1 GB.sort -rh Indicates that the results should be sorted in descending order by value.

If you want to display only the top five largest folders, you can modify the above command as follows:

du -h / | grep '[0-9\.]\+G' | sort -rh | head -n 5

among, head -n 5 Indicates that only the top five results will be displayed.

微信赞赏

WeChat

支付宝赞赏

Alipay

✍️ Author: Hong Mu

webmaster · Thanks for reading, stay tuned for more exciting content

Author homepage View home page →

Related articles

Browser caching increases the speed of secondary visits to your website

Browser caching increases the speed of secondary visits to your website Summary of pitfalls

Use browser caching of official words: If users will visit your website multiple times, browser caching of static resources can save users time. Cache headers should be applied to all cacheable static resources, not just to a small subset of static resources (for example, images). Cacheable resources include JS and CSS files, image files, and other binary object files (media files, PDF files, etc.). Normally, HTML doesn’t…
👁 202

Recommended reading

(PC+WAP) Shade Covering and Sunshade Mesh Website Template; Waterproof and Sun Protection Fabric Website Source Code – 1108

(PC+WAP) Shade Covering and Sunshade Mesh Website Template; Waterproof and Sun Protection Fabric Website Source Code – 1108 Practical Collection pbootcms Template

A PbootCMS website template featuring a sunshade fabric mesh and waterproof sunshade fabric design, compatible with both PC and WAP devices. The practical and professional design is ideal for showcasing sunshade mesh and waterproof fabric products, as well as agricultural applications. This template helps篷 fabric companies showcase their products online and attract clients in the agriculture and construction sectors. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn...
👁 66
(Adaptive Mobile Version) Clean and sophisticated universal corporate website PBootCMS template – Download source code for product showcase websites – 0383

(Adaptive Mobile Version) Clean and sophisticated universal corporate website PBootCMS template – Download source code for product showcase websites – 0383 Practical Collection pbootcms Template

This set features a minimalist, sophisticated, and versatile enterprise PbootCMS website template designed for mobile devices. With its modern, minimalist design, it is ideal for businesses showcasing a variety of products to quickly create a professional brand website. It serves as an ideal, cost-effective, and high-efficiency solution for small and medium-sized enterprises looking to build their websites. Template Preview | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn | Related Articles: PbootC...
👁 49
Precision Machinery Manufacturing Website Template 0685

Precision Machinery Manufacturing Website Template 0685 Practical Collection Yiyou template

An EyouCMS website template designed specifically for the precision machinery and mechanical manufacturing industries. Its professional, precision-oriented design is ideal for showcasing mechanical equipment products, manufacturing processes, technical specifications, and industrial applications. This template helps mechanical manufacturing enterprises showcase their products online and attract industrial customers. Template Overview | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS | Eyou...
👁 63
(PC + WAP) Multilingual Foreign Trade Website Template – With Automatic Translation Feature – 1109

(PC + WAP) Multilingual Foreign Trade Website Template – With Automatic Translation Feature – 1109 Practical Collection pbootcms Template

A multilingual PbootCMS website template designed for international e-commerce use, supporting both PC and WAP devices with an automatic translation feature. Its international and professional design makes it ideal for foreign trade enterprises looking to create multilingual official websites. The automatic translation functionality enables businesses to promote their brands and products across global markets at a low cost. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.c...
👁 55
(Adaptive mobile version) Purple responsive electronic components website – PBootCMS template; Download source code for chip R&D and design websites – 0384

(Adaptive mobile version) Purple responsive electronic components website – PBootCMS template; Download source code for chip R&D and design websites – 0384 Practical Collection pbootcms Template

A PbootCMS website template designed for the R&D and development of adaptive purple responsive electronic components and chips for mobile devices. The design features a sophisticated, tech-inspired aesthetic, making it ideal for showcasing electronic chip and component products as well as a company's R&D capabilities. This template helps semiconductor companies showcase their technology online and attract clients from the electronics industry. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn...
👁 64