🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
3 messages
3 total messages Started by Ron Craig Wed, 12 Jan 1994 22:04
Links of Binaries
#5284
Author: Ron Craig
Date: Wed, 12 Jan 1994 22:04
28 lines
1961 bytes
I just installed nn on my machine, and it seems that many of
the commands (nnadmin, for example) are just copies of the
nn binary executable.  Is there any reason that these copies
must be huge physical copies?  Can't I just use a soft link
to make the aliases?

EG.   ln -s /usr/local/bin/nn /usr/local/bin/nnadmin

to get a 17-byte link instead of what I have now?
Here's what I have now:

-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nn
-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nnadmin
-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nnbatch
-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nncheck
-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nngoback
-rwxr-xr-x   1 craig    ds          1204 Jan 06 13:59 /usr/local/bin/nngrab
-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nngrep
-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nnpost
-rwxr-xr-x   1 craig    ds          3495 Jan 06 13:59 /usr/local/bin/nnstats
-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nntidy
-rwxr-xr-x   1 craig    ds          1334 Jan 06 13:59 /usr/local/bin/nnusage

Thanks!
Please respond to me at Ron_Craig@unc.edu

-- 
Ron_Craig@unc.edu
Re: Links of Binaries
#5285
Author: David Hamaker
Date: Wed, 12 Jan 1994 23:05
20 lines
1592 bytes
In article nms@bigblue.oit.unc.edu, craig@med.unc.edu (Ron Craig) writes:
> ... Can't I just use a soft link to make the aliases?
> 
> EG.   ln -s /usr/local/bin/nn /usr/local/bin/nnadmin
> 
> to get a 17-byte link instead of what I have now?
> Here's what I have now:
> 
> -rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nn
> -rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nnadmin
> ...

The ls output you show says the 8 large files are all hard links to the same data.
The number of links is the number right after the permissions.  That doesn't even
need the 17 bytes.  You have what you want already.  To convince yourself further,
do a "ls -li" and you should see all eight files have the same i-number (eight
directory entries pointing to the same inode).

-Dave
 dwh@cfcl.com
Re: Links of Binaries
#5286
Author: Ofer Inbar
Date: Wed, 12 Jan 1994 23:47
28 lines
2362 bytes
craig@med.unc.edu (Ron Craig) writes:
>I just installed nn on my machine, and it seems that many of
>the commands (nnadmin, for example) are just copies of the
>nn binary executable.  Is there any reason that these copies
>must be huge physical copies?  Can't I just use a soft link

>Here's what I have now:
>-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nn
>-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nnadmin
>-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nnbatch
>-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nncheck
>-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nngoback
>-rwxr-xr-x   1 craig    ds          1204 Jan 06 13:59 /usr/local/bin/nngrab
>-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nngrep
>-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nnpost
>-rwxr-xr-x   1 craig    ds          3495 Jan 06 13:59 /usr/local/bin/nnstats
>-rwxr-xr-x   8 craig    ds        432951 Jan 06 13:59 /usr/local/bin/nntidy
>-rwxr-xr-x   1 craig    ds          1334 Jan 06 13:59 /usr/local/bin/nnusage

These are not copies, they are hardlinks.  They do not take up any
extra space.  You can see that they are links because in the ls output
above, the link count for eight of your files is 8.  If you used ls -i,
you would see that all eight of these files have the same i-node.

  --  Cos (Ofer Inbar)  --  cos@cs.brandeis.edu
  --  WBRS (BRiS)  --  WBRS@binah.cc.brandeis.edu  WBRS@brandeis.bitnet
 Brandeis University Computer Science Department         (617) 736-2700
 415 South Street, Waltham MA, 02254-9110        System Admin: 736-2717
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads