[Switch] Is unlink used to delete a file in Linux?

Source: Internet
Author: User

Sender: zhllg (r0bertz a Gentoo D org), email area: linuxdev
Title: Re: Is unlink the file to be deleted in Linux?
Mail station: Shui muCommunity(Tue Oct 14 23:34:50 2008), Station

[In testking (don't fuck your time !) As mentioned in the masterpiece :]
: Rm/My/file is actually unlink (/My/file )?

Creating a file is to allocate an inode, and then allocate space for the file on the disk, so that the pointer in the inode points to this
And create a directory item in a special file such as a directory. The content is the file name-> inode number.

To create a hard connection, create a directory item in the corresponding directory, but do not create a new inode. The inode number is the file to be pointed.
Inode Number of the component

Delete is to delete the directory, that is, to remove the connection between the file name and inode, so it is called Unlink.

After the last directory item is deleted, no file can access this inode, And the inode can be re-accessed.
Allocated,

--
ZHANG Le, Robert
Http://www.gentoo-cn.org
Http://r0bertz.blogspot.com
Http://zhllg.spaces.live.com
Http://www.szlug.org

※Source: · Shui Mu community http://newsmth.net · [from: 223796.160. *]

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.