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

Use the e2fsck command in linux to check whether the partition using the Linux ext2 file system is working properly

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

Share

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

This article will explain in detail about using the e2fsck command in linux to check whether the partition using the Linux ext2 file system is working properly. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

The e2fsck command is used to check that partition using the Linux ext2 file system is working properly. The e2fsck command can check the ext2, ext3, and ext4 file systems, which is not recommended if the system is mounted, because it is not safe. The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.

Syntax format: e2fsck [parameters]

Common parameters:

Device prepared to check the hard disk partition, for example: / dev/sda1-b sets the location where the superblock is stored-B sets the size of the unit block-c checks whether the partition has bad tracks-C file stores the results of the inspection in the file to view-d print the debug results of the e2fsck-f Force check-F empties the buffer cache of the device before starting the inspection Avoid errors-l bad_blocks_file adds block data with bad tracks to bad_blocks_file-block data with bad tracks set by L bad_blocks_file is stored in bad_blocks_file, and if there is no such file, it is automatically generated-n opens the file system in [read-only] mode-p checks partition If there is a problem, automatically fix-v detailed display mode-V shows the current version of e2fsck-y preset all check questions will be answered [Yes]

Reference example

Check whether / dev/hda5 is normal, fix it automatically if there are any abnormalities, and set to answer all questions [Yes] if there are any questions:

[root@linuxcool] # e2fsck-a-y / dev/hda5 about using the e2fsck command in linux to check whether the partition using the Linux ext2 file system is working properly is here. I hope the above content can be helpful to you and learn more. If you think the article is good, you can 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