DEV Community

Discussion on: What Are Your Favorite Command Line Hidden Gems?

Collapse
 
chanduthedev profile image
chanduthedev

file command to know file format. Some times file name may contains wrong extension or doesn't contain extension. In this case file command really helps to know the format of the file. Below is the syntax.

file file_name

And below are some of results for file command.

"ASCII text" - normal text file
"ASCII text, with very long lines" - CSV file with large lines
"Zip archive data, at least v4.5 to extract" - ZIP file