Что такое формат файла 1?
.1 files store Unix manual pages in plain-text format, specifically for section 1 - executable programs and user commands. They are commonly referred to as man pages and are written in .roff markup using the man macro package (groff), with dot-prefixed directives such as .TH, .SH, .B, and .TP controlling layout when rendered.
Man pages are viewed by running man name_of_the_application in a Unix terminal. The numeral suffix indicates the manual section: .1 covers user commands, while .2 through .8 cover system calls, library functions, file formats, games, and administration commands respectively. All sections share the same underlying roff source format.
Man page files may be stored compressed - on most Linux and macOS systems they live at paths such as /usr/share/man/man1/ls.1.gz and are decompressed on demand by the man command. The .gz compression is invisible from the user's perspective.
Windows uses a different help system: in graphical mode, help is accessed by pressing F1, and from PowerShell by appending /? or -? to a command. For Unix-style man pages on Windows, the Windows Subsystem for Linux (WSL) provides a full man and groff environment. Of course, man page files must be installed for a given application before they can be displayed on any platform.
Безопасность и защита
РИСК: LOWA man-page source is plain text and does not execute on viewing. The only theoretical caution is that roff is a Turing-complete macro language and groff has historically had parsing bugs, so rendering a .1 from a wholly untrusted source is best done with the safer, sandboxed mandoc rather than full groff. In normal use (reading docs from packages and projects) a .1 file is harmless; opening it in a text editor is completely safe.
Детали формата
в двух словахПрограммы, открывающие файлы 1
Технические подробности
глубокая спецификация| Format type | Plain-text roff/groff source using the man macro package |
| Encoding | ASCII or UTF-8 plain text; no binary header or BOM required |
| MIME type | text/troff (also accepted as application/x-troff-man) |
| File signature | No binary magic bytes; man sources conventionally begin with a .TH title line, e.g. .TH LS 1 |
| Manual section covered | Section 1 - executable programs and general user commands |
| Markup macros | .TH (title/header), .SH (section heading), .B (bold), .I (italic), .TP (tagged paragraph), .PP (paragraph break) |
| On-disk storage | Frequently gzip-compressed as name.1.gz, stored under /usr/share/man/man1/ on Linux |
| Typical uncompressed size | 1 KB - 100 KB |
| Renderer / viewer | Processed by groff or nroff; displayed via the man command in a terminal |
| Standard page structure | Mandatory sections: NAME, SYNOPSIS, DESCRIPTION; common additions: OPTIONS, FILES, SEE ALSO, AUTHOR, BUGS |
| Sibling section extensions | .2 (system calls), .3 (library functions), .5 (file formats), .8 (system administration) |
| Associated operating systems | Linux, macOS, BSD variants; available on Windows via WSL (Windows Subsystem for Linux) |
| Developer / maintainer | Originated at Bell Labs (1971); groff implementation maintained by the GNU Project |
| Pre-formatted variant | Some .1 files are cat pages - pre-rendered text with backspace-overstrike bold, not roff source |
| Выпущен | 1971 (Unix Programmer's Manual, V1); man macros standardized over the 1970s-80s |
| Последняя версия | N/A (roff/man-macro convention; groff is the active implementation) |
| Открыть стандартное | Да · без роялти |
| Спецификация | man7.org |
Конвертации 1
Вопросы и ответы сообщества
спрошено пользователямиВопросов пока нет - станьте первым, кто спросит о файлах 1.