MAN

text/troff

Safe

Magic Bytes

Offset: 0
2E 5C 22

The MAN file format consists of Unix manual pages written in the troff typesetting language, originally developed at Bell Labs and currently maintained within the GNU Project via groff. These files serve as the standard reference documentation for system commands, programming interfaces, and configuration files on Linux and Unix-like environments. As a plain text format utilizing specific formatting macros, it poses minimal security risks but remains a critical component of modern operating systems.

Extension

.man

MIME Type

text/troff

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .man files in Python

Python
def is_man(file_path: str) -> bool:
    """Check if file is a valid MAN by magic bytes."""
    signature = bytes([0x2E, 0x5C, 0x22])
    with open(file_path, "rb") as f:
        return f.read(3) == signature

How to validate .man files in Node.js

Node.js
function isMAN(buffer: Buffer): boolean {
  const signature = Buffer.from([0x2E, 0x5C, 0x22]);
  return buffer.subarray(0, 3).equals(signature);
}
Go
func IsMAN(data []byte) bool {
    signature := []byte{0x2E, 0x5C, 0x22}
    if len(data) < 3 {
        return false
    }
    return bytes.Equal(data[:3], signature)
}

API Endpoint

GET /api/v1/man
curl https://filesignature.org/api/v1/man

Related Formats