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

How does linux check file size

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

Share

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

This article will explain in detail how to check the file size of linux. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Linux's way to see the file size is by executing the [du-ahskm file or directory name] command. If you want to see the size of a specified directory, use the command [du-sh directory_name].

Detailed introduction:

Command: du

Syntax format:

[plain] du [- ahskm] file or directory name

Parameter explanation-a: lists all file and directory capacity, because only the directory capacity is counted by default

-h: display in a capacity format that is easy for people to read (G/M/K), and automatically select the unit size of the display

-s: list only the total amount, but not the capacity occupied by each individual directory

-k: display in KB

-m: display common command references in MB

View the current directory size

[plain] du-sh.

View a specified directory size

[plain] du-sh directory_name

Displays the maximum of 10 directories or files with the largest (smallest) footprint under the specified directory:

[plain] du-sh * | sort-nr | head

Minimum:

[php] du-sh * | sort-n | this is the end of the head article on "how to check file size in linux". I hope the above content can be helpful to you so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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