Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Locating a lost symlink file name

4 views
Skip to first unread message

Jeff Hyman

unread,
Sep 11, 2009, 4:41:42 PM9/11/09
to
SCO 5.0.7
1. /u is mounted to /dev/u
2. Symlinked file is missing, gone, or not in original location.
# cd /u
# echo "ABCDEFG" > dog
# ln -s /u/dog /tmp/dog
# ls -l /u/dog
-rw-rw-rw /u/dog
# ls -l /tmp/dog
lrwxrwxrwx /tmp/dog -> /u/dog

Question:

1. There are link-missing errors, so I want to locate where
and name of the symlink file, if it exists.

2. Is there a command that can locate a symbolic linked file
when you ONLY list the original REAL file?

3. Any flags for 'fsck' to not cause any problems (-ofull -n)
assuming 'fsck' will track the problem... to locate if and where
there is a symlink?

Any feedback is appreciated.

- Jeff H

Jean-Pierre Radley

unread,
Sep 11, 2009, 4:59:46 PM9/11/09
to
Jeff Hyman typed (on Fri, Sep 11, 2009 at 04:41:42PM -0400):

| SCO 5.0.7
| 1. /u is mounted to /dev/u
| 2. Symlinked file is missing, gone, or not in original location.
| # cd /u
| # echo "ABCDEFG" > dog
| # ln -s /u/dog /tmp/dog
| # ls -l /u/dog
| -rw-rw-rw /u/dog
| # ls -l /tmp/dog
| lrwxrwxrwx /tmp/dog -> /u/dog
|
| Question:
|
| 1. There are link-missing errors, so I want to locate where
| and name of the symlink file, if it exists.

What is showing such errors? custom verification? If so, save the
error report and look at it.

| 2. Is there a command that can locate a symbolic linked file
| when you ONLY list the original REAL file?

I can't think of one, but my BackupEdge master log lists these symlinks.

| 3. Any flags for 'fsck' to not cause any problems (-ofull -n)
| assuming 'fsck' will track the problem... to locate if and where
| there is a symlink?

Fsck will note empty symlinks, but it won't detect existing symlinks
to any given real file.

--
JP

Jeff Hyman

unread,
Sep 11, 2009, 5:12:24 PM9/11/09
to
Jean-Pierre Radley typed (on Fri, Sep 11, 2009 at 04:59:46PM -0400):

| Jeff Hyman typed (on Fri, Sep 11, 2009 at 04:41:42PM -0400):
| | SCO 5.0.7
| | 1. /u is mounted to /dev/u
| | 2. Symlinked file is missing, gone, or not in original location.
| | # cd /u
| | # echo "ABCDEFG" > dog
| | # ln -s /u/dog /tmp/dog
| | # ls -l /u/dog
| | -rw-rw-rw /u/dog
| | # ls -l /tmp/dog
| | lrwxrwxrwx /tmp/dog -> /u/dog
| |
| | Question:
| |
| | 1. There are link-missing errors, so I want to locate where
| | and name of the symlink file, if it exists.
|
| What is showing such errors? custom verification? If so, save the
| error report and look at it.

LONE-TAR backup summaries.

|
| | 2. Is there a command that can locate a symbolic linked file
| | when you ONLY list the original REAL file?
|
| I can't think of one, but my BackupEdge master log lists these symlinks.

So does LONE-TAR... but neither control or fix a broken link.
A customer is getting errors on the backup summary where there are
missing links. Many times the REAL data may be missing, and its real
easy to know where the symlink points to. In this case, I'm looking
for a command that shows where the symlink is pointing to when all
you have is the REAL file to do a 'ls'.
The error long shows the symlink pointing back to itself... when in fact
its known that it crosses partitions.

|
| | 3. Any flags for 'fsck' to not cause any problems (-ofull -n)
| | assuming 'fsck' will track the problem... to locate if and where
| | there is a symlink?
|
| Fsck will note empty symlinks, but it won't detect existing symlinks
| to any given real file.
|
| --
| JP

It's good to hear from you JP :-) Been awhile since we've spoken.
- Jeff

Dan Martin

unread,
Sep 12, 2009, 9:18:35 AM9/12/09
to

Hi Jeff,

Ask your customer to umount /dev/u, then have them look in /u
to see if there are any files that could be the missing links.

When /dev/u is mounted, it SHOULD be to an empty /u directory.
If the /u directory is NOT empty, mounting a filesystem
to /u will hide those files that are a part of the root directory.

Good luck,
Dan Martin

Dan Martin

unread,
Sep 12, 2009, 10:01:02 AM9/12/09
to

Oops. I meant to say that mounting to a non-empty /u directory
will hide those files in /u that are a part of the root filesystem,
not root directory.

Dan

John DuBois

unread,
Sep 13, 2009, 2:52:00 AM9/13/09
to
In article <20090911204...@lonestar.cactus.com>,

Jeff Hyman <sco...@cactus.com> wrote:
>2. Is there a command that can locate a symbolic linked file
> when you ONLY list the original REAL file?

gfind has a -lname predicate for this purpose.

John
--
John DuBois spc...@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/

Jeff Hyman

unread,
Sep 14, 2009, 10:29:38 AM9/14/09
to
John DuBois typed (on Sun, Sep 13, 2009 at 01:52:00AM -0500):

John,

Now we're talkin'.
On 5.0.6, there is no 'gfind'.
Any spot to track this command down?

- Jeff H

Jeff Hyman

unread,
Sep 14, 2009, 10:27:06 AM9/14/09
to
Dan Martin typed (on Sat, Sep 12, 2009 at 07:01:02AM -0700):

Dan,

I know about data potentially being there if unmounted.
Seen that before :-)
If '/u' is unmounted, in multiuser mode, the dir is empty.

- Jeff H

Jean-Pierre Radley

unread,
Sep 14, 2009, 11:16:31 AM9/14/09
to
Jeff Hyman typed (on Mon, Sep 14, 2009 at 10:29:38AM -0400):

You can get source code for GNU utilities all over the internet. If you
don't prefer, as I do, to compile my own bianaries, then just grab the
findutils package from Skunkware.

--
JP

Brian K. White

unread,
Sep 14, 2009, 11:38:41 AM9/14/09
to

Install gwxlibs and/or gnutools. It's in one of those. The latest
version of gwxlibs is actually a sub-package in osr507mp5 which I have
installed even on 5.0.5 systems without apparent problem as long as the
prerequisites were installed first, which in your case is just going to
be rs506a and oss646c, but there is also a stand-alone package on
ftp.sco.com that's good enough. look for gwxlibs-2.1.0-something.
The latest gnutools is somewhat older than gwxlibs and is gnutools-507Kj
Many of the binaries in gnutools (possibly not gfind, but still, why
install broken stuff?) require gwxlibs, so gnutools installer will say
install gwxlibs first, however, gwxlibs is actually years newer, and, a
bunch of files overlap because they were moved from gnutools to gwxlibs,
so, you really want to force gnutools to install first, ignore errors,
then install gwxlibs. Otherwise the old gnutools displaces a bunch of
files from the new gwxlibs. search this list archive on google groups
for messages containing gnutools and gwxlibs and you should find a few
different posts where I gave a more detailed recipe in the past. You
need to place an empty file in /tmp just before the gnutools install to
tell it to allow you to ignore the gwxlibs requirement but I forget the
details.

Those are both pretty big downloads though, and then pretty big
installs, so much so that it might push the limits of your available
space on the root fs because the default install procedure for osr 506
sets up, or suggests anyways, a pretty small root. So, There are older
versions around too that might or might not have the required feature,
but they require a lot less for you to install them because they were
compiled years earlier on older systems with fewer add-on libraries.
Many skunkware binaries don't require anything at all, they were built
against stock libraries and can just be installed on stock systems. I
don't remember the different skunkware package names that might have
find in it. There might be a nice obvious seperate package called find,
but I think it's more likely included in one called find utils or file
utils or shell utils, or different versions in more that one of those.
So, if you think you can't do the big new packages, you can look for
those old skunkware ones.

-- bkw


Bill Campbell

unread,
Sep 14, 2009, 12:30:35 PM9/14/09
to sco-...@lists.celestial.com

OK, What's the minimum necessary to get gcc working on OSR 6?

Bill
--
INTERNET: bi...@celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
Voice: (206) 236-1676 Mercer Island, WA 98040-0820
Fax: (206) 232-9186 Skype: jwccsllc (206) 855-5792

Giving money and power to government is like giving whiskey and car keys to
teenage boys -- P.J. O'Rourke

Jeff Hyman

unread,
Sep 28, 2009, 12:17:32 PM9/28/09
to
Brian K. White typed (on Mon, Sep 14, 2009 at 11:38:41AM -0400):
Brian... sorry I'm late on this... but THANKS!!!!
for the great reply.

- Jeff H

0 new messages