[TriLUG] Equivalent to Solaris "what" command

David Brain dbrain at gmail.com
Tue Feb 26 11:45:20 EST 2008


>From the manpage for 'what' (at least on BSD)

'     what reads each file name and searches for sequences of the form
``@(#)'', as inserted by the source code control system.  It prints
the
     remainder of the string following this marker, up to a null
character, newline, double quote, or ``> character.''
'

So it seems somewhat dependent on SCCS or some such source control mechanism.

Personally I like the 'file' command for finding useful summary info on files:

'$ file names.png
names.png: PNG image data, 4145 x 4197, 8-bit/color RGBA, non-interlaced
$ file ld-2.6.1.so
ld-2.6.1.so: ELF 32-bit LSB shared object, Intel 80386, version 1
(SYSV), dynamically linked, stripped'

David.

On Tue, Feb 26, 2008 at 11:02 AM, Brian Henning
<Brian.Henning at datadirect.com> wrote:
> Hi Gang,
>
>  A friend of mine is asking about the "linux equivalent of the what
>  command on Solaris."  Apparently, there's a command included with the
>  Solaris C compiler called "what", which can extract information from a
>  binary file about source code revisions, for example:
>
>  $ what libodbc.so
>  libodbc.so:
>           qeunix.hpp $Revision:   1.3  $,$Date::   Dec 05 20$
>           ucnvconv.hpp     $Revision: 1.4 $     $Date:: Apr 03 2006$
>           bug.hpp     $Revision: 1.1 $     $Date:: Dec 04 2006$
>           noansi.hpp     $Revision: 1.0 $     $Date:: Oct 07 2005$
>           bos.hpp     $Revision: 1.17 $     $Date:: Jun 27 2007$
>                 [...]
>
>  This strikes me as a compiler feature.  Googling with the word "what" is
>  not a very efficient endeavor, so I thought I would ask here.  Does GCC
>  include such a feature, and if so, how is it used?
>
>  Many thanks,
>  ~Brian
>
>  ----------------
>  Brian A. Henning
>    DataDirect
>  Support Engineer
>   888-332-6797
>  ----------------
>
>
>  --
>  TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
>  TriLUG Organizational FAQ  : http://trilug.org/faq/
>  TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>



More information about the TriLUG mailing list