Linux
The system information is stored in the file, and the file is similar to ordinary official documents. Each file has its own name, content, storage address, and other administrative information, such as the user of the file, the size of the file, and so on. File can be
a letter, an address book, or a program's source statement, program data, and even can include executable programs and other non-body content.
Linux file system has a good structure, the system provides a lot of file processing programs. This article mainly describes the commonly used file processing commands.
file
1. The role of the content to determine the file type, the use of permissions are all users.
2. Format
file through probing text
File [options] File name
3.[options] Main parameters
-V: Displays the version information after the standard output and exits.
-Z: Detects compressed file types.
-L: Allow the connection to be met.
-F Name: Reads the list of file names to parse from the file NameFile.
4. Brief description
You can use the file command to know whether a file is a binary (elf-formatted) executable, a shell script file, or any other format. File types that can be identified include directories, shell scripts, English text, binary executables, C-language source files, text files, and DOS executable files.
5. Application Examples
if we see a file with no suffix grap, you can use the following command:
$ file Grap
grap:english Text
at this point the system shows that this is an English text file. Note that the file command is not able to detect multimedia file types including graphics, audio, video, and so on.
This article is from the "--" blog, please be sure to keep this source http://57388.blog.51cto.com/47388/1544711
linux-File Processing command-file