6.24. File-4.18

The File package contains a utility for determining the type of a given file or files.

6.24.1. Installation of File

Prepare File for compilation:

./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \

Compile the package:


Install the package:

make DESTDIR=${CLFS} install

6.24.2. Contents of File

Installed programs: file
Installed library: libmagic.[a,so]

Short Descriptions


Tries to classify each given file; it does this by performing several tests—file system tests, magic number tests, and language tests


Contains routines for magic number recognition, used by the file program