Linux Basic Concepts-----Touch What's going on behind a new file

Source: Internet
Author: User

An ordinary user executes a command under the shell, what happens behind this, is a summary of the individual, if there is a wrong place welcome to build, thank you!


Touch/tmp/test.txt


#######################################################################################

Tom executes this command in the shell, the shell sends the command to the kernel and determines whether the command exists, determines whether Tom has permission to execute through the metadata on the file system, the kernel loads the mkdir instruction and data from memory, and starts mkdir as Tom. The kernel determines whether the mkdir process initiated by Tom has permission to/ TMP directory to establish a called Text.txt file, if the permissions through the system call to the kernel request to establish a file, the kernel will be used to go to the CPU to execute, and then the CPU will store the results in memory, and then the kernel from memory to extract the results, the kernel will be the result of the file system in the corresponding storage space on a block, and To the process, the process through the shell performance to the user.


This article is from the "Hanging Sword" blog, please be sure to keep this source http://sublime.blog.51cto.com/8856101/1434025

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.