tutorials bash

Get file type information from the command line

Often forgotten the file command will give you a simple summary of a file's type and content.

At the prompt enter file <filename> where <filename> is the name of the file you are interested in.

You will receive output detailing the files contents, e.g.

A Word Document.doc: Composite Document File V2 Document, Little Endian, Os: Windows, Version 6.1 Code page: -535, Title: A Word Document, Author: mxf793, Template: Normal, Last Saved By: mxf793, Revision Number: 4, Name of Creating Application: Microsoft Office Word, Total Editing Time: 07:00, Create Time/Date: Mon Feb 7 11:52:00 2011, Last Saved Time/Date: Mon Feb 7 11:56:00 2011, Number of Pages: 2, Number of Words: 271, Number of Characters: 1545, Security: 0

Over 10,000 developers have bought Create GUI Applications with Python & Qt!
Create GUI Applications with Python & Qt6
More info Get the book

Downloadable ebook (PDF, ePub) & Complete Source code

To support developers in [[ countryRegion ]] I give a [[ localizedDiscount[couponCode] ]]% discount on all books and courses.

[[ activeDiscount.description ]] I'm giving a [[ activeDiscount.discount ]]% discount on all books and courses.