ident in C provides information about a compiled program or function such as its version, date created or edited and the like. A utility, what, can be used like: e.g., what func.o, to display that information. The information is filled-in by a source code management system such as SCCS, RCS or CVS .
So suppose when you are programming, you will start a program like this :
ident "$Id$"
/*
* Copyright (C) 2000-2012 Your Name
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General
* Public License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*/
/*
* Name: $Source$
* Purpose:
* Version: $Revision$
* Modified: $Date$
* Author: Your Name
* Date:
* $Log$
*/
So what happens here is that all the information related to the file such as it's version no, author name etc are all recorded for future reference.
When a file containing these $token$ strings is placed into, say, CVS, those tokens will be translated like this :
#ident "$Id: histfile.c,v 1.1.1.1 2011/10/07 18:06:40 trona Exp $"
/*
* Copyright (C) 2000-2012 Your Name
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General
* Public License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*
* Name: $Source: /usr/local/cvsroot/utils/histfile.c,v $
* Purpose: display content of a user's .sh_history file
* Version: $Revision: 1.1.1.0 $
* Modified: $Date: 2012/10/07 18:06:40 $
* Author: Your Name
* Date: 24 Jun 2012
* $Log: histfile.c,v $
* Revision 1.1.1.1 2012/10/07 18:06:40 trona
* initial installation Slackware 13.0
*
*/
The $Log$ token is very important; in a project where code is edited by many hands, every edit is recorded with a comment described by what was done, why it was done and when it was done.
Unfortunately, the what utility is not ported to Linux but can be gotten from The Heirloom Project hosted at Sourceforge if you're interested.
It' a little big, but i hope you get the info you are looking for .
You can also refer this link : http://www.unix.com/programming/26107-what-ident.html
Ident– Chris Sep 27 '12 at 19:30