ident
Identify SCCS/RCS keywords in files
SYNOPSIS
ident [-qV] [file ...]
PARAMETERS
-q
Suppress warning messages.
-V
Print the version number of the ident command.
DESCRIPTION
ident is a utility from the RCS (Revision Control System) package designed to locate and print identification keywords embedded within files. These keywords, such as $Id$, $Log$, $Revision$, $Author$, and $Date$, are typically expanded by RCS when a file is checked out (e.g., using the co command). The ident command scans specified files (or standard input) for occurrences of these special strings. Upon finding a keyword, it prints the filename followed by the expanded keyword string. This feature is particularly useful for quickly determining the version, author, and modification date of a source file, even after it has been compiled into a binary, provided the keywords were included and expanded in the source.
CAVEATS
ident only works effectively if the target files contain RCS identification keywords, and these keywords have been properly expanded by RCS during a checkout operation (e.g., using co). If keywords are not present or not expanded, ident will not find any information. While it can scan binary files, the interpretation of embedded keywords in non-textual data might sometimes be less straightforward or only possible if they exist as contiguous text strings.
<B>KEYWORD EXPANSION</B>
RCS keywords like $Id$ are special strings that, when processed by commands like co (checkout), are automatically expanded to include specific revision control information. For example, $Id: filename,v 1.2 2023/10/27 10:00:00 author Exp $. ident then reads these expanded strings.
<B>USAGE WITH BINARIES</B>
A powerful use case for ident is to scan compiled binary executables or libraries. If the source files contained RCS keywords and those keywords were expanded into the source code before compilation, the resulting binary might still contain these strings. This allows ident to report the version of the source code used to create the binary, without needing the original source or build information.
HISTORY
The ident command has been a fundamental part of the Revision Control System (RCS) since its inception in the early 1980s by Walter F. Tichy. RCS was one of the earliest widely adopted version control systems, predating more modern systems like CVS, SVN, and Git. ident embodies a core principle of RCS: embedding version metadata directly into the files themselves, allowing for decentralized identification of file versions without needing access to the RCS repository. Its design reflects the computing environment of its time, emphasizing simplicity and direct file manipulation for version tracking.


