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 to use the Linux e2fsck command

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

Most people do not understand the knowledge of this article "how to use the Linux e2fsck command", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to use the Linux e2fsck command" article.

The Linux common command e2fsck is used to check the integrity of the second extended file system.

E2fsck is used to check the integrity of the second extended file system

The returned value and representative meaning after the execution of e2fsck are as follows:

No errors occurred in 0.

1 an error occurred in the file system and has been corrected.

2 an error occurred in the file system and has been corrected.

4 an error occurred in the file system, but no correction.

8 an error occurred during operation.

16 an error occurred in the syntax used.

An error occurred in the 128 shared function library.

Syntax e2fsck (option) (parameter) option-a: automatically repair the file system without asking the user;-b: specify superblock instead of the default superblock;-B: specify the size of the block in bytes;-c: execute badblocks together to mark the damaged block;-C: record the information of the inspection process in file descriptor, so that the whole inspection process can be fully monitored. -d: display troubleshooting information;-f: forcibly check for correctness even if the file system shows no signs of error;-F: clear the buffer of the device before execution;-l: add the blocks specified in the file to the list of damaged blocks;-L: first clear the list of damaged blocks, and then add the specified blocks in the file to the list of damaged blocks. Therefore, the blocks that damage the list of blocks are the same as those specified in the file;-n: open the file system in read-only mode and execute it in a non-interactive manner, with all question dialogues set to "no";-p: automatically repair the file system without asking the user;-r: this parameter exists only for compatibility and has no practical effect. -s: if the byte order of the file system is not appropriate, swap the byte order, otherwise do nothing;-S: regardless of the byte order of the file system, swap the byte order;-t: display time information;-v: display detailed information during execution;-V: display version information;-y: execute in a non-interactive manner, all questions are set to "yes" to answer. Parameter file system or partition: specify the device file name corresponding to the file system or partition.

Instance checks whether there is a problem with / dev/sda1, and automatically fixes it if it is found:

E2fsck-a-y / dev/sda1, please umount partition before executing e2fsck or fsck, otherwise you have a chance to damage the file system. If you need to check and repair the root directory /, you need to go to singal user mode to execute.

The above is about the content of this article on "how to use Linux e2fsck commands". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please 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