The file Command
The file command is used to determine the file type. This command is useful because the name of a file does not always indicate its file type. The following examples perform a long listing of a file to provide some background information on the file, and then the file command is run to show the file type. I don't cover the command used to list files until the next chapter, but I include it in these examples. The ls command provides a listing of files. ls is covered in detail in the next chapter. We need to use it in this chapter in only its basic form.. Combined with the "-l" option, you can produce a long listing that provides a lot of information about files. Using ls -l in the following examples, you will see the name of each ...
Get HP-UX 11i System Administration Handbook and Toolkit, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.