Could someone please help me figure out the meaning of high link counts in the /usr/local/grass5/bin directory? I'm used to link counts being fairly low numbers, so I'm not sure why I'm getting link counts up around 400 in the grass bin dir after an install. The file sizes are all equal as well, but much larger than what I would expect for a symbolic link.
Is there a policy on where bin files are placed? Should they be kept in the etc/bin/cmd and parallel directories with an ln -s from grass5/bin?
Thanks in advance for help.
John Harrop
SJ Geophysics Ltd
On Tue, Nov 19, 2002 at 02:31:44PM -0800, John Harrop wrote:
Could someone please help me figure out the meaning of high link counts
in the /usr/local/grass5/bin directory? I'm used to link counts being
fairly low numbers, so I'm not sure why I'm getting link counts up
around 400 in the grass bin dir after an install. The file sizes are
all equal as well, but much larger than what I would expect for a
symbolic link.
Is there a policy on where bin files are placed? Should they be kept in
the etc/bin/cmd and parallel directories with an ln -s from grass5/bin?
The real executables are in etc/bin/cmd/ or etc/bin/inter/. I'm not sure
why hard links to etc/front.end are used in bin/ other than maybe
some systems didn't/don't support symlinks when this scheme was cooked
up. Anyway, I think grass is pretty close to being able to get rid of
that front.end "helper", but a few modules need to be rewritten still.
--
static const char signature =
"Copyright (c) 2002 Eric G. Miller <egm2@jps.net>";
John Harrop wrote:
Could someone please help me figure out the meaning of high link counts
in the /usr/local/grass5/bin directory? I'm used to link counts being
fairly low numbers, so I'm not sure why I'm getting link counts up
around 400 in the grass bin dir after an install. The file sizes are
all equal as well, but much larger than what I would expect for a
symbolic link.
Almost everything in $GISBASE/bin is a hard link to
$GISBASE/etc/front.end. You should note that all of the "files" are
the same size as front.end; furthermore "ls -i" should indicate that
they are all the same inode.
Normally, the only files in the bin directory which *aren't* links to
front.end are tcltkgrass, nviz and r.agnps50.run.
Is there a policy on where bin files are placed? Should they be kept in
the etc/bin/cmd and parallel directories with an ln -s from grass5/bin?
Non-interactive programs go into etc/bin/cmd, while interactive
programs go into etc/bin/inter. The bin directory should contain a
similarly-named link (normally a hard link, although a symbolic link
may work) to etc/front.end. The links can be constructed automatically
using the "gmakelinks5" script (use the "-i" switch to update an
installed version).
Basically, front.end checks whether any command-line arguments were
given, and whether the corresponding programs exist in etc/bin/cmd
and/or etc/bin/inter.
If no arguments were given, front.end will run the "inter" version if
it exists, otherwise it will run the "cmd" version.
If any arguments were given, front.end will run the "cmd" version if
it exists, otherwise it will display an error message noting that
"This command must be run interactively".
--
Glynn Clements <glynn.clements@virgin.net>