ARCHIVED: What do some common Unix file extensions mean?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

Common Unix file extensions include:

ASCII (text) file, often containing ANSI codes
.awk awk script
.bak Backup copy of file
.bz2 bzip2 compressed file
.c C program source code
.C C++ program source code
.cc C++ program source code
.cgi CGI web page program
.dat Data or other information
.doc Explanatory text file
DVI format document, produced by TeX/LaTeX
.el Emacs Lisp source code
.elc Compiled Emacs Lisp program
.f Fortran source code
Fortran source code (f77 compiler)
.fig Xfig data file
Fortran source code (fort compiler)
.gif GIF image file
.gz gzip compressed file
.h C or C++ program header file
Hypertext Markup Language document
Emacs TeXinfo file in "info" format
Graphical image file in JPEG format
.log Logged information
.m Maple file
.mat MATLAB script
nroff input file for processing with -me option
.mpg MPEG animation file
nroff input file for processing with -ms option
Object code, produced by compilers
.pal Xpaint palette file
.pbm Portable bitmap
.pgm Portable gray scale pixmap
.pl Perl program
PNG format graphics file (similar to GIF)
.ppm Portable pixmap
.ps PostScript format document
.py Python program
.rast Sun raster file
.rgb SGI native image file
Shell archive (expand with sh file.shar)
.ss Scheme source code
.S Assembly (machine) code
Tape archive, used by tar command
.tar.gz Tarred-then-gzipped files
.tex TeX or LaTeX format document
.tif TIFF (Adobe) image file
Tarred-then-gzipped files (equivalent to .tar.gz)
.txt Generic text file
.uue uuencoded file
.xbm X bitmap
Packed file (from the pack command) or early gzip file
Compressed file, from compress command
Zipped (compressed) file, from zip command

Some others include:

(File ending with ~ ) Emacs backup file
(File surrounded with #'s) Emacs autobackup file
(File beginning with , ) MH removed message
(File starting with a dot, ending with rc) configuration file

Lastly, files with an extension that is a number or a number plus a letter (e.g., cat.1, dbm.3b) are often manual page files, in runoff format.

At Indiana University, for personal or departmental Linux or Unix systems support, see Get help for Linux or Unix at IU.

This is document affo in the Knowledge Base.
Last modified on 2018-01-18 10:05:12.

Contact us

For help or to comment, email the UITS Support Center.