Ever visited one of those sites that downloads a file with a Javascript or some other active method, and you wind up with a file named "download.asp" or "file.asp"? Ever wonder how to figure out what it is, without trying to drag-and-drop it on everything?
In the terminal, it's quite simple - you can use the file command, like this:
In this real-world example, I couldn't figure out how to expand the file ... the file output lets me know I need to use gzip! For full information on file, make sure you check out the manual pages by typing man file in the terminal window.
In the terminal, it's quite simple - you can use the file command, like this:
[xperiment:~/Documents/downloads] berto% file download.php(Line break added to shorten the line width!) The file command looks at the file, and compares it to a database of types, and then gives you its best guess at the filetype.
download.php: gzip compressed data, deflated,
last modified: Fri Feb 23 18:17:34 2001, os: Unix
In this real-world example, I couldn't figure out how to expand the file ... the file output lets me know I need to use gzip! For full information on file, make sure you check out the manual pages by typing man file in the terminal window.
•
[5,592 views]

