Results 1 to 10 of 10
Saw a command on here that shows where a program is installed. For the life of me can't remember what it was. Know it was important though
Along the lines ...
- 11-18-2003 #1Linux Engineer
- Join Date
- Jul 2003
- Location
- Farnborough, UK
- Posts
- 1,305
command to show location
Saw a command on here that shows where a program is installed. For the life of me can't remember what it was. Know it was important though
Along the lines of
?? wine
would return
/usr/lib/wine
Summat like that anyway.
Help?
Ta
- 11-18-2003 #2Just Joined!
- Join Date
- Nov 2003
- Posts
- 8
there are quite a few
whereis wine
which wine
locate wine
The last one will find all files with wine but I think you are referring to the first one i.e. whereis
- 11-18-2003 #3
wow great commands -see you learn somthing new everyday
Also is there a list of commands on this site somewere or dose someone have a link to a list of commansd and what they do?
~Mike ~~~ Forum Rules
Testing? What's that? If it compiles, it is good, if it boots up, it is perfect. ~ Linus Torvalds
http://loft306.org
- 11-18-2003 #4
do you mean this
http://www.this_site_does_not_exist/viewtopic.php?t=75
BIG K aka Kyle
Programming Forums
www.kylekonline.com
Please don\'t PM me for help-- ask in the forums instead!
- 11-18-2003 #5Linux User
- Join Date
- Jun 2003
- Location
- Calgary, AB CANADA
- Posts
- 496
To use the locate command, the locate database must be less than 8 days old. To update it, su - to root, and issue updatedb...
\"Everything should be made as simple as possible, but not simpler.\"
Albert Einstein
- 11-18-2003 #6Linux Engineer
- Join Date
- Mar 2003
- Location
- U.S.A.
- Posts
- 1,025
Which is why I prefer "find -name filename.ext" over locate. If the file is on your system it will find it. No worring about the db being updated or not.
Dan
\"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"
- 11-18-2003 #7
Yes thats it
~Mike ~~~ Forum Rules
Testing? What's that? If it compiles, it is good, if it boots up, it is perfect. ~ Linus Torvalds
http://loft306.org
- 11-18-2003 #8Just Joined!
- Join Date
- Nov 2003
- Posts
- 8
The resaon why I prefer locate over find is locate is much faster as it accesses the database rather than doing the search from scratch. I have a nice script to find files using find though.
You have to supply a starting point to search
#! /bin/bash
### Find a file in some search path
if [ $# -lt 2 ]; then
echo "Usage: $0 [file name] [search path]"
exit 0
fi
find $2 -name \*$1\* -print
- 11-19-2003 #9Or you can set a cron job to do it daily or weekly.
Originally Posted by CopperTop
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
- 11-19-2003 #10Linux Engineer
- Join Date
- Jul 2003
- Location
- Farnborough, UK
- Posts
- 1,305
Thanks to all, appreciated.


Reply With Quote
