#Bash 的 fsck.cramfs 命令
fsck.cramfs [OPTION]... [FILESYSTEM]
功能
检查并修复压缩 ROM 文件系统。
类型
可执行文件(/usr/sbin/fsck.cramfs),属于 util-linux。
参数
OPTIONS选项:-v,--verbose- 显示详细信息-b,--blocksize blocksize- 块大小--extract[=directory]- 测试解压缩整个文件系统-a-自动修复;此选项将被静默忽略-y-总是 yes;此选项将被静默忽略-h,--help- 显示帮助-V,--version- 显示版本
FILESYSTEM- 要检查的文件系统
返回值
- 0 - 成功
- 4 - 文件系统错误未得到纠正
- 8 - 操作错误
- 16 - 打印使用信息
#示例
$ fsck.cramfs -v dir.img
cramfs endianness is little
dir.img: OK
#相关命令
| 命令 | 说明 |
|---|---|
| fsck | 检查并修复 Linux 文件系统 |
| mkfs.cramfs | 创建 cramfs 文件系统 |
#推荐阅读
#手册
FSCK.CRAMFS(8) System Administration FSCK.CRAMFS(8)
NAME
fsck.cramfs - fsck compressed ROM file system
SYNOPSIS
fsck.cramfs [options] file
DESCRIPTION
fsck.cramfs is used to check the cramfs file system.
OPTIONS
-v, --verbose
Enable verbose messaging.
-b, --blocksize blocksize
Use this blocksize, defaults to page size. Must be equal to what
was set at creation time. Only used for --extract.
--extract[=directory]
Test to uncompress the whole file system. Optionally extract
contents of the file to directory.
-a
This option is silently ignored.
-y
This option is silently ignored.
-h, --help
Display help text and exit.
-V, --version
Print version and exit.
EXIT STATUS
0
success
4
file system was left uncorrected
8
operation error, such as unable to allocate memory
16
usage information was printed
SEE ALSO
mount(8), mkfs.cramfs(8)
REPORTING BUGS
For bug reports, use the issue tracker at
https://github.com/util-linux/util-linux/issues.
AVAILABILITY
The fsck.cramfs command is part of the util-linux package which can be
downloaded from Linux Kernel Archive
<https://www.kernel.org/pub/linux/utils/util-linux/>.
util-linux 2.39.3 2023-10-23 FSCK.CRAMFS(8)