NEWFS_HFS(8)
β¨ NEWFS_HFS β¨
okay bestie, quick heads up before we dive in: this is the newfs_hfs page from the System Manager's Manual, and it's literally the glow-up tutorial for making a brand new HFS Plus file system. let's get into it π
π NAME π
newfs_hfs β construct a new HFS Plus file system
πΈ SYNOPSIS πΈ
newfs_hfs [-N] [-U uid] [-G gid] [-M mask] [-P] [-s] [-b block-size]
[-c clump-size-list] [-i first-cnid] [-J [journal-size]]
[-n node-size-list] [-v volume-name] special
newfs_hfs -N partition-size [-U uid] [-G gid] [-M mask] [-P] [-h | -w]
[-s] [-b block-size] [-c clump-size-list] [-i first-cnid]
[-J [journal-size]] [-n node-size-list] [-v volume-name]
π¦ DESCRIPTION π¦
So newfs_hfs builds an HFS Plus file system on the special device you point it at. That's the whole main character job. β¨
But bestie, before you run it β the disk should already be partitioned, using either the Disk Utility application or pdisk(8). Don't skip that step, it's giving "no cap" energy. π
The file system default parameters get calculated based on how big the disk partition is. And honestly? Typically the defaults are reasonable β the vibes are immaculate, no notes. However, newfs_hfs has several options so you can selectively override the defaults. Obsessed. Here's all of them:
π OPTIONS π
-N [partition-size]β makes the file system parameters print out without actually creating the file system. Just a peek, no commitment. π If the argument following the-Nstarts with a decimal digit, it's assumed to be a partition size. That partition size can be written in decimal, octal (with a leading0), or hexadecimal (with a leading0x). (also yes, the original page says "paritition" and we respect the typo era π) You can spec the partition size in 512-byte blocks (suffixb), petabytes (suffixp), terabytes (suffixt), gigabytes (suffixg), megabytes (suffixm), or kilobytes (suffixk). All of those suffixes mean binary, not decimal, multipliers β so like1kis 1024 bytes, iykyk. If you don't give a suffix, the value is assumed to be in bytes; and if you give an illegal suffix, it results in a size of 0 bytes (oops).
If the partition size is given, then no special device argument shall be provided. If no partition size is given, then the size of the given special device is used instead β and the special device will not be written to. Safe queen. π
-U uidβ sets the owner of the file system's root directory touid.-G gidβ sets the group of the file system's root directory togid.-M maskβ specifies the octal access permissions mask for the file system's root directory.-Pβ setskHFSContentProtectionBitin the volume's attributes, which will cause the volume to be mounted with the"protect"option if the kernel supports it. Protection era. π‘οΈ-sβ creates a case-sensitive HFS Plus filesystem. By default a case-insensitive filesystem is created. Heads up though: case-sensitive HFS Plus file systems require a Mac OS X version of 10.3 (Darwin 7.0) or later.-b block-sizeβ the allocation block size of the file system. The default value is4096.-c clump-size-listβ this specifies the clump and/or initial sizes, in allocation blocks, for the various metadata files. Clump sizes are specified with the-coption followed by a comma separated list of the formarg=blocks.
Example: -c c=5000,e=500
a=blocksβ set the attribute file clump size.b=blocksβ set the allocation bitmap file clump size.c=blocksβ set the catalog file clump size.d=blocksβ set the data fork clump size.e=blocksβ set the extent overflow file clump size.r=blocksβ set the resource fork clump size.
-i first-cnidβ this specifies the initial catalog node ID for user files and directories. The default value is16.-J [journal-size]β creates a journaled HFS+ volume. The default journal size varies, based on the size of the volume. Appending anMto the journal size implies megabytes (so like,64Mis 64 megabytes). The maximum journal size is1024megabytes. π-n node-size-listβ this specifies the b-tree node sizes, in bytes, for the various b-tree files. Node sizes are specified with the-noption followed by a comma separated list of the formarg=bytes. The node size must be a power of two and no larger than32768bytes.
Example: -n c=8192,e=4096
a=bytesβ set the attribute b-tree node size.c=bytesβ set the catalog b-tree node size.e=bytesβ set the extent overflow b-tree node size.
-v volume-nameβ volume name (file system name) in ascii or UTF-8 format. Name your baby. πΌ
π SEE ALSO π
π HISTORY π
The newfs_hfs command appeared in Mac OS X Server 1.0. And as of Mac OS X 10.6, this utility no longer generates HFS standard file systems. RIP to that era, fr fr. π
and that's the whole page bestie, you ate that π«Άβ¨ this was the newfs_hfs page from Mac OS X, dated June 19, 2008 β iconic date, iconic manual. go forth and format responsibly ππ§πΈ
π¦ where this page comes from
- debian bookworm: hfsprogs 540.1.linux3-5+b1 Β· APSL
- debian trixie: hfsprogs 540.1.linux3-6 Β· APSL
- ubuntu jammy: hfsprogs 540.1.linux3-5build1 Β· APSL
- ubuntu noble: hfsprogs 540.1.linux3-5build3 Β· APSL
- ubuntu questing: hfsprogs 540.1.linux3-6
- ubuntu resolute: hfsprogs 540.1.linux3-6build1 Β· APSL
- ubuntu stonking: hfsprogs 540.1.linux3-6build2 Β· APSL
- Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms