What is the meaning of this text line?

( seen in /etc/ttys in FreeBSD 10.1 )

Code:
$FreeBSD: releng/10.1/etc/etc.i386/ttys 267236 2014-06-08 17:50:07Z nwhitehorn$

I have seen text lines like this in many FreeBSD files.

I want to know what is the meaning of each field.

I suppose that nwhitehorn is the user who modified the file, 2014* and 17* is the date and time of modification, but I don't know what is the meaning of 267236 and the other fields.
 
Last edited by a moderator:
The longer answer is that this is a RCS ID.

RCS is an old version control system; it's installed by default on FreeBSD, and you can use it like so:

Code:
$ echo '$Id$' > myfile
$ echo 'Hello' >> myfile

# Checkin in RCS repo
$ ci myfile

# Checkout from RCS repo
$ co myfile

$ cat myfile
$Id: test,v 1.1 2015/02/11 14:05:41 martin Exp $

Hello!

Since RCS is file-based, we *need* this version string in the file itself to keep track which version this file is.

Later, CVS appeared. CVS is really just a bunch of scripts around RCS to add more of a concept of a "repository" as we know today, as well as many other features. But the version string stayed.

FreeBSD used CVS for a long time, and replaced the default $Id$ string with $FreeBSD$. It has now switched to subversion, but the RCS ID strings stayed, even though subversion doesn't use them by default.

The advantage of these strings are still the same: you know which version of this file is without actually having the repository. Especially for the contents of /etc this is useful when upgrading, tools like mergemaster(8) use this information.
 
Back
Top