A brief talk on application examples of Linux file

Source: Internet
Author: User

Brief introduction

650) this.width=650; "class=" wp-image-55187 size-full aligncenter "src=" http://www.linuxprobe.com/wp-content/ Uploads/2017/03/wkiom1dnvmwxsoahaahigxqqsrw156.png "width=" 677 "height=" 682 "style=" Height:auto;margin-left:auto; Margin-right:auto; "/>

The official interpretation of file is:

File-determine file type

This means that you can recognize the meaning of the file type, and can also be used to identify the encoding format of some files.

Instance

Let's look at a few examples of comparative use.

Instance One: Default

File directly with the files, get the information shown below

File Book.pdfdelete.pdf:PDF document, version 1.3file bookdelete:pdf document, version 1.3

It can be seen that the addition of suffixes are not related.

Example two: No name displayed

File-b book.pdf PDF document, version 1.3

With the-b parameter, is the meaning of the brief, will only show the file identification results, do not display the file name, which in fact, for many files, is not very friendly.

Example three: output understandable information

File-i delete.pdfdelete.pdf:application/pdf; Charset=binary

With the-I parameter, which is the meaning of the MIME type, I don't know what it means, but I can just easily read the meaning of the type of file I want to know. That's enough, isn't it, after all, we're here to use the file command.

Example four: Viewing file information for file names in files

Cat hello.txtsunset.jpg file-f Hello.txtsunset.jpg:JPEG image data, JFIF standard 1.01

This listen to such a mouthful, in fact very simple, in fact, is not difficult, plus-f parameter, is the meaning of the File-from type, in the end is a few meaning, that is, you want to view the file type information of the filename in a file, from the file to read the file to the information, such as the next can know.

Example five: good-looking chicken ribs

File-f = = = "Sunset.jpg sunset.jpg = = = JPEG image data, JFIF standard 1.01

This function to tell the truth, do not understand what the role of the default: the feeling is very useful, of course, this should belong to the custom type, as follows:

Example six: View the file information for a soft link

File a.jpg a.jpg:symbolic link to ' sunset.jpg ' file-l a.jpg a.jpg:jpeg image data, JFIF standard 1.01

By default, if there is no L parameter, can only get this file is soft link information, if you add this parameter, you can see the source file information, this feature is still very good.

Original address: http://www.linuxprobe.com/linux-file.html

This article is from the "blog" blog, please be sure to keep this source http://coderhsf.blog.51cto.com/12629645/1912349

A brief talk on application examples of Linux file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.