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 are the common commands for Linux disk management

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

Share

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

This article mainly introduces what Linux disk management commands are commonly used, the article is very detailed, has a certain reference value, interested friends must read it!

In the Linux system, how to effectively use and manage the storage space is a very important technology.

Command introduces the ls-al command

This command is all too familiar, you can display the details of all the files and directories in the current directory, and you can directly see which files in the current directory take up more disk space. Well, it tastes better if you add the-h option.

Stat command

The stat command can display more detailed information about a specified file / directory, including size, block, inode, creation / access / modification time, and so on.

Df command

The df command is an abbreviation for the word disk free and is used to show the free space of the current disk. Several common options are:

Df-h: displays the free disk space in a user-friendly manner.

Df-a: shows the full disk usage, including those disk areas where free space is 0.

Df-T: shows disk usage by file system type, such as xfs, ext2, ext3, btrfs, and so on.

Df-I: displays used and idle inodes.

In addition to using the command line, you can also use a graphical tool called disks. Using this tool, you can see the usage of the disk visually.

Du command

Du is the abbreviation of the English phrase disk useage, which shows the use of files, directories, and other elements on disk. The common uses are as follows:

Du-h: displays the usage of all directories and subdirectories in a format that is easy for humans to read

Du-a: displays the disk usage of all files in the current directory

Du-s: only the totals are displayed and only the last plus values are listed. (used to display the size of the directory)

Fdisk-l command

Fdisk is a program that creates and maintains partition tables that are compatible with partition tables of type DOS or disk lists of type BSD or SUN. The fdisk-l command can display all kinds of information about disk partitions.

Friends who are messing around with the excessive area table should be familiar with this step, and then there are operations related to partition creation, deletion, modification, and so on. But here, we just use the-l option to take a look at the current partition and take no further action.

These are all the contents of this article entitled "what are the common commands for Linux disk management?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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

Development

Wechat

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

12
Report