[SLUG] Broken symlinks

Gavin Baker gavbaker at ntlworld.com
Wed Sep 18 18:01:00 BST 2002


On Wed, 2002-09-18 at 14:42, aardvark llama wrote:
> >My main concern was finding out what they meant!
> > 
> >I found the .DCOP* thing puzzling because it seems to resolve itself if 
> >left for a while.

It should be created when a dcopserver starts, and removed when it
quits. 

> There is an interesting function call fuser -- so named before the 
> appearance of the eponymous chocholate bar -- that give various options will 
> tell you the process id's of any processes that are currently accessing the 
> file. You could than ps -ef | grep <process id> and find out what is 
> accessing the file.

fuser isn't really useful in this case, as the file is only used for
short periods at a time (so you would have to catch it being accessed),
and the file itself contains the dcopserver's PID anyway.

(za at martian:za)$ fuser .DCOPserver_martian__0
(za at martian:za)$

(za at martian:za)$ ps $(cat .DCOPserver_martian__0 | tail -n 1)
  PID TTY      STAT   TIME COMMAND
16288 ?        S      0:00 kdeinit: dcopserver --nosid

> >I guess that is the package managment system cleaning up?
> I haven't a clue. `Whereof one does not no, thereof one should remain 
> silent.'

It will be the dcopserver cleaning up. No package should ever install
anything under /home. 
(More info at www.pathname.com/fhs and www.linuxbase.org)
 
> >Other files however, seem to permanantly have a red background, for 
> >example,
> >from /usr/sbin.
> >-rwsr-xr-x	1 root	root	21204 Feb 22  2002 userhelper*
> >-rwsr-xr-x	1 root	root	  5860 Mar 15  2002 usernetctl*
> As I said before the colouring is configurable. On my box files with similar 
> permissions are coloured a particularly virulent green.

Like Wil says (It is "Wil" right?;), the colours could mean anything.
They are taken from your $LS_COLORS environment variable (echo
$LS_COLORS), which might or might not be read from a file in /etc by
your ~/.bashrc (on sane distros). See dir_colors(5) for more.

> >Both have white lettering on a red background. There are many files like 
> >this on my system, at a guess probably 10 or so in /usr/sbin alone.
> These are not symbolic links -- but this *could* be because your version of 
> gnu-o-vision is colouring files with the "set suid bit" inidicated by the s 
> in the -rwsr-x-r-x bit of the ls -l output.

Wil mentioned "alias" before. A couple more useful bash builtin
functions are "command" and "type". Help for all three of these are in
bash(1) or available with "help <command>"

type <foo> shows what <foo> actually is. (an alias, a file etc).

alias <foo | foo='bar'> shows what foo is aliased as | defines foo to be
an alias for bar.

command <foo> runs foo, even if it aliased.

If the colour is confusing, you can use "command ls", to run "ls" and
not the aliased "ls".

I hope we havent confused you even more by going into irrelevant things.
If we have, i would highly recommend the "rutebook" for a great
introduction to all things Linux. It's available free on the net or in
print form. Mail me if you can't find it and i will send you a copy.

Regards,
Gav







More information about the Scarborough mailing list