Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux 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
    Lansbury's Lido

    thekiadriver on #linuxforums - fleetingly

  2. #2
    Just 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

  3. #3
    Linux Guru loft306's Avatar
    Join Date
    Oct 2003
    Location
    The DairyLand
    Posts
    1,666
    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

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

  6. #5
    Linux 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

  7. #6
    flw
    flw is offline
    Linux 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\"

  8. #7
    Linux Guru loft306's Avatar
    Join Date
    Oct 2003
    Location
    The DairyLand
    Posts
    1,666
    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

  9. #8
    Just 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

  10. #9
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    Quote Originally Posted by CopperTop
    To use the locate command, the locate database must be less than 8 days old. To update it, su - to root, and issue updatedb...
    Or you can set a cron job to do it daily or weekly.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  11. #10
    Linux Engineer
    Join Date
    Jul 2003
    Location
    Farnborough, UK
    Posts
    1,305
    Thanks to all, appreciated.
    Lansbury's Lido

    thekiadriver on #linuxforums - fleetingly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •