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

📄 ar.5.5

📁 早期freebsd实现
💻 5
字号:
.\" Copyright (c) 1990, 1991, 1993.\"	The Regents of the University of California.  All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\"     @(#)ar.5.5	8.1 (Berkeley) 6/9/93.\".Dd June 9, 1993.Dt AR 5.Os.Sh NAME.Nm ar.Nd archive (library) file format.Sh SYNOPSIS.Fd #include <ar.h>.Sh DESCRIPTIONThe archive command.Nm arcombines several files into one.Archives are mainly used as libraries of object files intended to beloaded using the link-editor.Xr ld 1 ..PpA file created with.Nm arbegins with the ``magic'' string "!<arch>\en".The rest of the archive is made up of objects, each of which is composedof a header for a file, a possible file name, and the file contents.The header is portable between machine architectures, and, if the filecontents are printable, the archive is itself printable..PpThe header is made up of six variable length.Tn ASCIIfields, followed by atwo character trailer.The fields are the object name (16 characters), the file last modificationtime (12 characters), the user and group id's (each 6 characters), the filemode (8 characters) and the file size (10 characters).All numeric fields are in decimal, except for the file mode which is inoctal..PpThe modification time is the file.Fa st_mtimefield, i.e.,.Dv CUTseconds sincethe epoch.The user and group id's are the file.Fa st_uidand.Fa st_gidfields.The file mode is the file.Fa st_modefield.The file size is the file.Fa st_sizefield.The two-byte trailer is the string "\`\en"..PpOnly the name field has any provision for overflow.If any file name is more than 16 characters in length or contains anembedded space, the string "#1/" followed by the.Tn ASCIIlength of thename is written in the name field.The file size (stored in the archive header) is incremented by the lengthof the name.The name is then written immediately following the archive header..PpAny unused characters in any of these fields are written as spacecharacters.If any fields are their particular maximum number of characters inlength, there will be no separation between the fields..PpObjects in the archive are always an even number of bytes long; fileswhich are an odd number of bytes long are padded with a newline (``\en'')character, although the size in the header does not reflect this..Sh SEE ALSO.Xr ar 1 ,.Xr stat 2.Sh HISTORYThere have been at least four.Nm arformats.The first was denoted by the leading ``magic'' number 0177555 (stored astype int).These archives were almost certainly created on a 16-bit machine, andcontain headers made up of five fields.The fields are the object name (8 characters), the file last modificationtime (type long), the user id (type char), the file mode (type char) andthe file size (type unsigned int).Files were padded to an even number of bytes..PpThe second was denoted by the leading ``magic'' number 0177545 (stored astype int).These archives may have been created on either 16 or 32-bit machines, andcontain headers made up of six fields.The fields are the object name (14 characters), the file last modificationtime (type long), the user and group id's (each type char), the file mode(type int) and the file size (type long).Files were padded to an even number of bytes.For more information on converting from this format see.Xr arcv 8 ..PpThe current archive format (without support for long character names andnames with embedded spaces) was introduced in.Bx 4.0 .The headers were the same as the current format, with the exception thatnames longer than 16 characters were truncated, and names with embeddedspaces (and often trailing spaces) were not supported.It has been extended for these reasons,as described above.This format first appeared in 4.4BSD..Sh COMPATIBILITYNo archive format is currently specified by any standard..At Vhas historically distributed archives in a different format fromall of the above.

⌨️ 快捷键说明

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