⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mkfs.8

📁 UNIX v6源代码 这几乎是最经典的unix版本 unix操作系统设计和莱昂氏unix源代码分析都是用的该版
💻 8
字号:
.th MKFS VIII 11/1/73.sh NAMEmkfs \*- construct a file system.sh SYNOPSIS.bd /etc/mkfsspecialproto.sh DESCRIPTION.it Mkfsconstructs a file systemby writing on the special file.it specialaccording to the directionsfound inthe prototype file.it proto.The prototype filecontains tokens separated by spaces ornew lines.The first token is the name of a fileto be copied onto block zero asthe bootstrap program(see boot procedures (VIII)).The second token is a number specifying thesize of the created file system.Typically it will be the number of blocks on the device,perhaps diminishedby space for swapping.The next token is the i-list size in blocks(remember there are 16 i-nodes per block).The next set of tokens comprise the specificationfor the root file.File specifications consist of tokensgiving the mode,the user-id,the group id,and the initial contents of the file.The syntax of the contents fielddepends on the mode..s3The mode token for a file is a 6 character string.The first characterspecifies the type of the file.(The characters.bd \*-bcdspecify regular, block special,character special and directory filesrespectively.)The second character of the typeis either.bd uor.bd \*-to specify set-user-id mode or not.The third is.bd gor.bd \*-for the set-group-id mode.The rest of the modeis a three digit octal number giving theowner, group, and other read, write, executepermissions (see.it chmod(I))..s3Two decimal numbertokens come after the mode; they specify theuser and group ID's of the owner of the file..s3If the file is a regular file,the next token is a pathnamewhence the contents and size are copied..s3If the file is a block or character special file,two decimal number tokensfollow which give the major and minor device numbers..s3If the file is a directory,.it mkfsmakes the entries \fB.\fR and \fB..\fRand thenreads a list of names and(recursively)file specifications for the entriesin the directory.The scan is terminated with thetoken \fB$\fR..s3If the prototype file cannot be opened andits name consists of a string of digits,.it mkfsbuilds a file system with a singleempty directory on it.The size of the file system is the valueof.it protointerpreted as a decimal number.The i-list size is the file system sizedivided by43 plus the size divided by 1000.(This corresponds to an average size ofthree blocks per filefor a 4000 block file system andsix blocks per file at 40,000.)The boot program is left uninitialized..s3A sample prototype specification follows:.s3.nf.in +5/usr/mdec/uboot4872 55d\*-\*-777 3 1usr	d\*-\*-777 3 1	sh	\*-\*-\*-755 3 1 /bin/sh	ken	d\*-\*-755 6 1		$	b0	b\*-\*-644 3 1 0 0	c0	c\*-\*-644 3 1 0 0	$$.in -5.fi.sh "SEE ALSO"file system (V),directory (V),boot procedures (VIII).sh BUGSIt is not possible to initialize a file larger than64K bytes..brThe size of the file system is restricted to64K blocks..brThere should be some way to specify links.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -