Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What command does linux use to check the amount of space occupied by subdirectories under a directory?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "what command does linux use to check the space occupied by a subdirectory under a directory?" in the actual case operation process, many people will encounter such a dilemma, and then let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!

The purpose of this paper is to locate which directory takes up the most files when the disk space is full, so as to analyze the reasons for the lack of space.

1. Log in to the system host you need to view through ssh or telnet with xshell or other terminal software

2. Check the overall space consumption through df-hl (linux) or df-g (aix), and locate the directory with the most space.

3. Then enter this subdirectory and execute du-ks | sort-rn | more displays the space of the subdirectory from large to small according to space usage

Note:

Sometimes the lack of space may be caused by too large files, or it may be due to too many files. At this time, new files cannot be written. At this time, you need to use df-ih to check the occupation of the number of files.

This is the end of the content of "what command does linux use to check the space occupied by subdirectories under a directory?" Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report