
17.4 Identifying and Working with File Types 261
17.4.3 System Files
.rpm – a Red Hat Package Manager file
.conf – aconfiguration file
.a – an archive file
.lock – a “lock”file; determines whether a program is in use
17.4.4 Programming and Scripting Files
.h – a C and C++ program language header file
.c – a C program language source code file
.cpp – a C++ program language source code file
.o – aprogramobjectfile
.pl – aPerlscript
.tcl – aTCLscript
.so – a library file
But file extensions are not always used, or used consistently. So what happens when a file doesn’t
have an extension, or the file doesn’t seem to be what the extension says it’s supposed to be?
That’s when the file command can come in handy.
In 16 on page 217, we created a file called saturday – without an extension. Using the file com-
mand, we can tell what the file is by typing:
file saturday
and we’ll see it’satextfile. Any file that’s designated a text file should be readable using cat, more,
or less.
Tip: To learn more about the file command, read the file man page by typing man
file.
Comentarios a estos manuales