[Ilugc] basic q's

Suraj suraj at symonds.net
Mon Dec 13 09:28:06 IST 2004


Mohammed Riyaz wrote: 
,----
| 1.Some  times the umount  does not  work with  the cdrom.  even umount
| /dev/cdrom -f gives a device busy signal, what do u do then??
`----

Of course, you  cannot! because you are sitting on a  branch of a tree
and trying to cut  that branch off! What you should do  is to see what
programs are  using the cdrom. It might  just be a shell  in which you
have 'cd'ed into /cdrom.

,----
| 2.Is it possible to find  the files that have changed (added/modified)
| , in the last xx minutes?? (basically it is like running updatedb with
| updatedb reporting  whenever it finds  a new files..or  something like
| that)
`----

man find (and look for -cmin, -mmin)

,----
| 3.How do find what version of gtk has been installed??
`----

Simply, if  you  are  running on a  standard packaged version  of Gtk,
then all you need  to do is use your package manager  (like rpm -qa or
dpkg -l and  grep the output). But if you compiled  Gtk by source, you
can    either   run    'strings'    on   the    library   file    (ex:
/usr/local/lib/libgtk-1.2.so.0)  or if  by chance  you also  happen to
have the README file installed as  part of the make install, you could
check the README.

,----
| 4.How do u  find where the rpm has extracted  it's contentes to??(i am
| not   talking  about   well  packed   rpm's  which   install   to  the
| standard/expected directories)
`----

AFAIK  rpm can be  converted to  a cpio  archive. But  my info  may be
dated. 

,----
| 5.Is  make distclean  equivalent to  uninstall?? what  about makefiles
| whcih dont provide this option?  how do u uninstall then??
`----

No! distclean  is similar  to 'make clean'  but slightly  different in
that it also deletes files  created by configure and friends. When you
run configure you might have  noticed that its slower during the first
run but faster during the successive runs (if you dont distclean, that
is). This is because configure 'caches' some of the info it found into
certain  files.    when  you  do  make  distclean,   this  cache  gets
cleared. (this  might be useful  when configuration changes  (like you
upgraded some dependant development library since last 'make')

However, If you want to uninstall, you should do 'make uninstall'.  Of
course, if your Makefile does not contain an 'uninstall' rule then you
are,  unfortunately,  on your  own :)    You can  either look   at the
Makefile and 'figure out' what gets installed (*VERY PAINFUL*, IMO) OR
have a neat wrapper around install ;) 

I  have this  bash function  as  a wrapper  to install  (install is  a
program that gets called by most sane Makefiles while 'Make'ing):

function install {
echo `date` $@ >>/usr/local/log/myinstall.log
`which install` $@
}


Watch out!  There  might be some badly written  Makefiles that may use
'cp' and such instead of 'install'.

Good luck!

  -Suraj

-- 
,-----------------[http://www.symonds.net/~suraj/]---o
| The mridangam came from Ganesha's victory over a demon.
`------------------------------[suraj at symonds.net]---o


More information about the ilugc mailing list