File: fsck_hfs.8

package info (click to toggle)
hfsprogs 332.25-11
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 6,440 kB
  • ctags: 7,805
  • sloc: ansic: 58,120; makefile: 25
file content (153 lines) | stat: -rw-r--r-- 4,431 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
.\" Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
.\" 
.\" The contents of this file constitute Original Code as defined in and
.\" are subject to the Apple Public Source License Version 1.1 (the
.\" "License").  You may not use this file except in compliance with the
.\" License.  Please obtain a copy of the License at
.\" http://www.apple.com/publicsource and read it before using this file.
.\" 
.\" This Original Code and all software distributed under the License are
.\" distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
.\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
.\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
.\" FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
.\" License for the specific language governing rights and limitations
.\" under the License.
.\" 
.\"     @(#)fsck_hfs.8
.Dd November 21, 2002
.Dt FSCK_HFS 8
.Os "Mac OS X"
.Sh NAME
.Nm fsck.hfs
.Nd HFS file system consistency check
.Sh SYNOPSIS
.Nm fsck.hfs
.Fl q
.Op Fl df
.Ar special ...
.Nm fsck.hfs
.Fl p
.Op Fl df
.Ar special ...
.Nm fsck.hfs
.Op Fl n | y | r
.Op Fl dfgl
.Op Fl m Ar mode
.Op Fl c Ar size
.Ar special ...
.Sh DESCRIPTION
.Pp
The
.Nm
utility verifies and repairs standard HFS and HFS+ file systems.
.Pp
The first form of
.Nm
quickly checks the specified file systems to determine whether
they were cleanly unmounted.
.Pp
The second form of
.Nm
preens the specified file systems.
It is normally started by
.Xr fsck 8
during systen boot, when a HFS file system is detected.
When preening file systems,
.Nm
will fix common inconsistencies for file systems that were not
unmounted cleanly.
If more serious problems are found,
.Nm
does not try to fix them, indicates that it was not
successful, and exits.
.Pp
The third form of
.Nm
checks the specified file systems and tries to repair all
detected inconsistencies.
.Pp
If no options are specified 
.Nm
will always check and attempt to fix the specified file systems.
.Pp
The options are as follows:
.Bl -hang -offset indent
.It Fl c Ar size
Specify the
.Ar size 
of the cache used by  
.Nm
internally.  Bigger 
.Ar size 
can result in better performance but can result in deadlock when
used with 
.Fl l 
option.  Size can be specified as a decimal, octal, or 
hexadecimal number.  If the number ends with a ``k'', ``m'', 
or ``g'', the number is multiplied by 1024 (1K), 1048576 (1M),
or 1073741824 (1G), respectively.  
.It Fl d
Display debugging information.
This option may provide useful information when 
.Nm
cannot repair a damaged file system.
.It Fl f
When used with the
.Fl p
option, force
.Nm
to check `clean' file systems, otherwise it means force
.Nm
to check and repair journaled HFS+ file systems.
.It Fl g
Causes
.Nm
to generate its output strings in GUI format.
This option is used when another application with a graphical user interface
(like Mac OS X Disk Utility) is invoking the
.Nm
tool.
.It Fl l
Lock down the file system and perform a test-only check.
This makes it possible to check a file system that is currently mounted,
although no repairs can be made.
.It Fl m Ar mode
Mode is an octal number that will be used to set the permissions for the
lost+found directory when it is created.
The lost+found directory is only created when a volume is repaired and orphaned
files or directories are detected.
.Nm
places orphaned files and directories into the lost+found directory (located
at the root of the volume).
The default mode is 01777.
.It Fl p
Preen the specified file systems.
.It Fl q
Causes
.Nm
to quickly check whether the volume was unmounted cleanly.
If the volume was unmounted cleanly, then the exit status is 0.
If the volume was not unmounted cleanly, then the exit status will be non-zero.
In either case, a message is printed to standard output describing whether the
volume was clean or dirty.
.It Fl y
Always attempt to repair any damage that is found.
.It Fl n
Never attempt to repair any damage that is found.
.It Fl r
Rebuild the catalog file on the specified file system.
This option currently will only work if there is enough contiguous space on the
specified file system for a new catalog file and if there is no damage 
to the leaf nodes in the existing catalog file.
.El
.Pp
.Sh SEE ALSO
.Xr fsck 8
.Sh BUGS
.Nm
is not able to fix some inconsistencies that it detects.
.Sh HISTORY
The
.Nm
command appeared in Mac OS X Server 1.0 .