Wednesday, 22 October 2014

Mac OS X - Want to know what file-type something is ?

I found a file in a folder: -

ls -al a

-rw-r--r--@ 1 hayd  staff  414720 20 Aug 18:41 a

No idea what it is, I tried renaming it to .PDF, .DOC, .TXT etc. but neither Finder, TextEdit, vi nor OpenOffice would open it.

Then I remembered ....

Mac OS X is just like Unix, in fact it IS Unix.

And we have the file command: -

file a

a: CDF V2 Document, Little Endian, Os: Windows, Version 6.1, Code page: 1252, Author: Bob Slobb, Template: C:\Program Files\Microsoft Office\Visio11\1033\FOOBAR.VST, Name of Creating Application: Microsoft Visio

at which point, all becomes clear. It's a Visio drawing, which I can open in OmniGraffle.

A swift rename later: -

mv a a.vsd

and we're up and running.

Remember, folks, file is your friend

No comments:

Reminder - installing podman and skopeo on Ubuntu 22.04

This follows on from: - Lest I forget - how to install pip on Ubuntu I had reason to install podman  and skopeo  on an Ubuntu box: - lsb_rel...