As we explore the system, it will be useful to know what files contain. To do this, we will use the
file command to determine a file’s type. As we discussed earlier, filenames in Linux are not required to reflect a file’s contents. For example, while a filename like picture.jpg would normally be expected to contain a JPEG compressed image, it is not required to in Linux. We can invoke the
file command this way:
When invoked, the
file command will print a brief description of the file’s contents. For example:
file picture.jpgpicture.jpg: JPEG image data, JFIF standard 1.01
There are many kinds of files. In fact, one of the common ideas in Unix-like operating systems such as Linux is ...