E2compr 0.4 User Manual – What is a link

Wayback MachineAbout this captureCOLLECTED BY Organization: Alexa Crawls Starting in 1996, Alexa Internet has been donating their crawl data to the Internet Archive. Flowing in every day, these data are added to the Wayback Machine after an embargo period. Collection: Alexa Crawls DE Crawl data donated by Alexa Internet. This data is currently not publicly accessible TIMESTAMPSloadingGo to the first, previous, next, last section, table of contents.

Let’s divide the concept of a (computer) file into its contents and itsname in a directory listing.

A given content can have more than one file name that refers to it.When I do `ls -li /bin/*zip /bin/*cat’, I see:

2391 -rwxr-xr-x 1 root root 16568 Aug 10 1996 /bin/cat2050 -rwxr-xr-x 3 root root 45056 Aug 20 1996 /bin/gunzip2357 lrwxrwxrwx 1 root root 4 Sep 18 1996 /bin/gzcat -> gzip2050 -rwxr-xr-x 3 root root 45056 Aug 20 1996 /bin/gzip2050 -rwxr-xr-x 3 root root 45056 Aug 20 1996 /bin/zcat

In this example, the file names `/bin/gunzip’, `/bin/gzip’ and`/bin/zcat’ all refer to the same file content: they all refer toinode 2050, which points to certain disk blocks where the file contentis stored. The inode also stores the permission bits, the file’sowner’s user id and owner-group id, timestamps, ext2 attributes(including whether or not the file is ext2-compressed), data length, andother things.

The link count of `3′ indicates that there are three names currently inthe filesystem that correspond to the same file (or, more accurately, tothe same inode).

By coincidence, all three of these links (names) happen to be in thesame directory in the above example, but in general they needn’t be;they need only be in the same filesystem.

`/bin/cat’, on the other hand, is a different file:you can see that it has a different length, a different modificationdate, and you would guess that its data is stored in different blocks onthe hard drive.

`/bin/gzcat’, on the third hand, is a symbolic link.Symbolic links are a different kettle of fish altogether. In general,when we say `a file with multiple links’, we’re not including symboliclinks, but only those multiple file names that share the same inodenumber. The `link count’ always excludes symbolic links from the count.

Go to the first, previous, next, last section, table of contents.

Leave a Reply

Your email address will not be published. Required fields are marked *