[SLUG] Broken symlinks

Gavin Baker gavbaker at ntlworld.com
Thu Sep 19 00:59:00 BST 2002


On Wed, 2002-09-18 at 22:41, aardvark llama wrote:

> >fuser isn't really useful in this case, as the file is only used for
> >short periods at a time
> Sure. (So far I have been trying to keep away from any prior knowledge of 
> dcop -- probably because I have none -- and to give some general pointers 
> about trouble-shooting stuff. It's (in part) what I get paid to do).

Sounds like fun :)  What do you do?

> >Like Wil says (It is "Wil" right?;)
> I'll normally take two l's -- as in will -- but apart from direct abuse, I'm 
> amenable to most naming conventions ;)

Ahh, sorry about that Will ;)
 
> I also tend to find file -- which tells you what type of file you are 
> dealing with -- and which -- which tells you where the executable that will 
> be run lives quite useful too.

Agreed, and 'find' also. Perhaps we could create a list of all these
bread and butter file/shell utilities along with some examples of how
they can be used. I'm sure it would be useful, and would also mean the
docs section on the website would come to life. :)

The manpages describe all options just fine, but some examples of
situations where they are useful would be good. Like a SLUG-cookbook(tm)
or something!

for example,

  "I get 'umount: /cdrom: device is busy' when i try to unmount my CD
   drive. Nothings using the damn cd. I wanna change it!! Whats up?"

  Something *is* using the cdrom device. 
  To find out what, use "lsof /dev/your-cd-device". 
  Or "fuser /cdrom". Then kill the PID.
  Or if you just want to kill it, use "fuser -km /cdrom" 

  
  "I've got this file called foo.bin. What the hell is .bin?"

  By convention .bin could be an executable file or shell archive or cd 
  image. In reality it could be anything at all. Unix doesn't make any
  requirements about filename extensions. To interrogate the file and
  find out what it really is, use "file foo.bin".


  "I have 106 versions of foo installed. Which version is run when i
  type 'foo' at a console?"

  'which foo' will show you. (rpm -q --what-provides $(which foo) and
  dpkg -S $(which foo) are very common uses of which inside a shells
  command substitution operator, `which foo` also works on some shells.
  The shell substitutes 'which foo' for the absolute pathname.)


etc...
  
Wanna take a stab at it? Anyone think this idea has merit? or am I off
on a mad mission again? (I wanna see the doc link point to something!:)

Regards,
Gav






More information about the Scarborough mailing list