hard links

Lonni J Friedman netllama at gmail.com
Sun Oct 28 08:57:29 PDT 2007


On 10/28/07, David A. Bandel <david.bandel at gmail.com> wrote:
> On 10/27/07, Lonni J Friedman <netllama at gmail.com> wrote:
> > On 10/27/07, David A. Bandel <david.bandel at gmail.com> wrote:
> > > On 10/27/07, Collins Richey <crichey at gmail.com> wrote:
> > > > Thought for the weekend.
> > > >
> > > > What is the purpose of a hard link, and does anything in Linux land
> > > > use hard links?
> > >
> > > I'll answer your question in reverse order:
> > > lots of stuff uses it.  look through /bin and /sbin using:
> > > ls -ali | sort
> > > here's my output:
> > > david at tole:/bin$ ls -ali | sort | uniq -D -w 7
> > > 2572294 -rwxr-xr-x  3 root root   25140 May 21 00:44 bunzip2
> > > 2572294 -rwxr-xr-x  3 root root   25140 May 21 00:44 bzcat
> > > 2572294 -rwxr-xr-x  3 root root   25140 May 21 00:44 bzip2
> > > 2572296 -rwxr-xr-x  2 root root    2105 May 21 00:43 bzcmp
> > > 2572296 -rwxr-xr-x  2 root root    2105 May 21 00:43 bzdiff
> > > 2572297 -rwxr-xr-x  3 root root    3642 May 21 00:43 bzegrep
> > > 2572297 -rwxr-xr-x  3 root root    3642 May 21 00:43 bzfgrep
> > > 2572297 -rwxr-xr-x  3 root root    3642 May 21 00:43 bzgrep
> > > 2572300 -rwxr-xr-x  2 root root    1297 May 21 00:43 bzless
> > > 2572300 -rwxr-xr-x  2 root root    1297 May 21 00:43 bzmore
> > > 2588739 -rwxr-xr-x  2 root root      61 Aug 18 21:49 gunzip
> > > 2588739 -rwxr-xr-x  2 root root      61 Aug 18 21:49 uncompress
> > >
> > > So for example, when you call bunzip2 or bzip2, you're calling the
> > > same binary, just with a different name.   This is like calling the
> > > binary with different options, but easier to remember.
> > >
> > > Take a look at `man bzip2` to see what I mean.
> >
> > Redhat uses a softlink (symlink).
> >
> > >
> > > ifup/ifdown on my system is the same as are many of the fsck binaries.
>                            ^^^^^^^^^
> please read the above phrase again
>
> >
> > ifup & ifdown are completely separate shell scripts on Redhat.
> >
>
> And your point is (other than whatever it is it has nothing to do with
> the question at hand)?
>
> Also, as you well know, I'm not running RedCrap.  However, if you look
> through your /bin and /sbin directories, you'll still find some
> hardlinks.  I haven't met the distro yet that doesn't use them,
> although some may exist. They won't all be the same from distro to
> distro, but they will exist all the same.
>
> Now, what did your post contribute to this thread?

The fact that you have a very narrow, outdated view of Linux?

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                                    netllama at gmail.com
LlamaLand                       https://netllama.linux-sxs.org



More information about the Linux-users mailing list