The file command is good at determining file types for my needs. Is there any way to map those results to conventional filename extensions?
I want to download I file using curl to a temporary directory with the appropriate extension. Currently I do something like this: tmp="$(mktemp -t 'curl')" curl -o "$tmp" ...
I have a folder (the iPhone Backup) with various files without a suffix. I want to run a batch process over these files, which detects each file's file-type (with the help of the magic-file database ...