Common Linux commands-File Processing Command 4

Source: Internet
Author: User

 

Tail view the last few lines of the file

The tail command displays 10 lines at the end of the file on the screen. If more than one file is specified, add a file name title before each folder. If the file name is not specified or the file name is "-", the standard input is read.

-N: the last few lines of the output file

-F output additional data when the file grows

Ln-link is used to generate link files

Links are divided into hard links and soft links. Hard links are created by default.

-S: Create a soft link

We can see that we created a hard link test2 to test3 above. At this time, we updated test2 and test3. This is because hard links are physically the same file. Each file in Linux has an I node, which is unique. At this time, we create a hard link and test3 uses the same I node as test2. Because of this, these two files are also synchronously updated. Sometimes we need to back up data in the system, but each modification must replace the original data, which is too cumbersome, at this time, we can create a hard link and place it in different directories for Synchronous updates.

Soft links are equivalent to shortcuts in windows. Although this is not the case, we can understand it in this way.

Hard links cannot be cross-file systems. Soft links can be cross-file systems.

From: Meng xiangyue's column

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.