PACKAGE.md 1.2 KB

File-5.46

The file utility is a command-line tool that attempts to classify each given file according to its contents. It performs several tests to determine the file type, including filesystem tests, magic number tests, and language tests.

Features

  • File Type Detection: Identifies file types by examining their contents rather than just file extensions
  • Magic Number Recognition: Uses a database of "magic numbers" to recognize file formats
  • Multiple Test Methods: Employs filesystem tests, magic number tests, and language tests for accurate classification
  • Extensible Database: Uses an extensible magic database that can be customized
  • Library Support: Includes the libmagic library for use by other applications

Installed Programs

  • file: The main command-line utility for file type detection

Installed Libraries

  • libmagic.so: Contains routines for magic number recognition used by the file program and other applications

Common Usage

# Determine file type
file document.pdf

# Get MIME type
file -i image.jpg

# Show brief description
file -b script.sh

# Check multiple files
file *.txt

License

This package is distributed under the BSD 2-Clause License.