LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to locate where a program is? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-locate-where-a-program-is-213559/)

minm 08-04-2004 09:39 PM

How to locate where a program is?
 
Hey, i'm trying to install flash for firefox but i need to find the directory, how do i do that?

rgiggs 08-04-2004 09:43 PM

if you want to find the firefox directory, then try this:
Code:

which firefox
it should tell you where the firefox file is, and that's probably what you want.

Tinkster 08-04-2004 09:47 PM

locate firefox | grep plugin

If that returns with empty hands run
updatedb -c as root first.


Cheers,
Tink

minm 08-04-2004 09:48 PM

thanks
it gave me /usr/bin/firefox
but thats the program to execute it, i need to find the directory of it :S

scuzzman 08-04-2004 10:01 PM

/usr/bin is where the executable is
the dir for it is probably /.mozilla

minm 08-04-2004 10:22 PM

this is what i put
Code:

Please enter the installation path of the Mozilla, Netscape,
or Opera browser (i.e., /usr/lib/mozilla): /home/mark/.mozilla/

WARNING: Please enter a valid installation path.

thats what it gives me :S

Tinkster 08-04-2004 10:32 PM

Tried my suggested method yet?
http://www.linuxquestions.org/questi...58#post1089058


Cheers,
Tink

minm 08-04-2004 10:48 PM

opps i didn't even see your post, sorry hehe

this is what i type, and the output

mark@linux:~> locate firefox | grep plugin
bash: locate: command not found


linux:/home/mark # updatedb -c
bash: updatedb: command not found


i was in root for the updatedb -c


so what's up?

Tinkster 08-04-2004 11:45 PM

You didn't install a few -in my opinion- quite basic tools.
In Slack the package is called slocate, have a look in
yast, and install them ...

Alternatively, try a

find -type d -iname "*firefox*" | grep plugin


I hope you have that one installed ;)


Cheers,
Tink

minm 08-05-2004 12:45 AM

hi, i did that and this is what i got

mark@linux:~> find -type d -iname "*firefox*" | grep plugin
mark@linux:~>

nothing
odd hmm?

Tinkster 08-05-2004 03:41 AM

Not really ... I am tired :)
find / -type d -iname "*firefox*" | grep plugin

Try that one...


Cheers,
Tink

minm 08-05-2004 08:16 AM

alright, i do that, and i get a lot of files being listed with permission denied, so i login as root and type it again and i get this

linux:/home/mark # find / -type d -iname "*firefox*" | grep plugin
find: /proc/12195/task: No such file or directory
find: . changed during execution of find
linux:/home/mark #

minm 08-05-2004 08:44 AM

ok, i installed the locate tools (updatedb) etc
but when i go updatedb -c it gives me

linux:/home/mark # updatedb -c
updatedb: invalid option -c
Usage: updatedb [--localpaths='dir1 dir2...'] [--netpaths='dir1 dir2...']
[--prunepaths='dir1 dir2...'] [--prunefs='fs1 fs2...']
[--output=dbfile] [--netuser=user] [--localuser=user]
[--old-format] [--version] [--help]

Report bugs to <bug-findutils@gnu.org>.

JZL240I-U 08-05-2004 08:50 AM

Just do updatedb without the "-c", works on my box.

Tinkster 08-05-2004 12:46 PM

Quote:

Originally posted by minm
ok, i installed the locate tools (updatedb) etc
but when i go updatedb -c it gives me

linux:/home/mark # updatedb -c
updatedb: invalid option -c
Usage: updatedb [--localpaths='dir1 dir2...'] [--netpaths='dir1 dir2...']
[--prunepaths='dir1 dir2...'] [--prunefs='fs1 fs2...']
[--output=dbfile] [--netuser=user] [--localuser=user]
[--old-format] [--version] [--help]

Report bugs to <bug-findutils@gnu.org>.

locate != slocate


Code:

[tink@diggn:~]$ updatedb --help
Secure Locate 2.7 - Released January 24, 2003

Copyright (c) 1999, 2000, 2001 Kevin Lindsay & Netnation Communications Inc. &
James A. Woods <jwoods@adobe.com>

search usage:  updatedb [-qi] [-d <path>] [--database=<path>] <search string>...
                updatedb [-r <regexp>] [--regexp=<regexp>]
database usage: updatedb [-qv] [-o <file>] [--output=<file>]
                updatedb [-e <dir1,dir2,...>] [-f <fs_type1,...> ] [-l <level>]
                        [-c] <[-U <path>] [-u]>
general usage:  updatedb [-Vh] [--version] [--help]

  Options:
  -u                - Create slocate database starting at path /.
  -U <dir>          - Create slocate database starting at path <dir>.
  -c                - Parse original GNU Locate's '/etc/updatedb.conf'
                        when using the -u or -U options.  If 'updatedb' is
                        symbolically linked to the 'updatedb' binary, the
                        original configuration file will automatically be
                        used.
  -e <dir1,dir2,...> - Exclude directories from the slocate database when
                        using the -u or -U options.
  -f <fs_type1,...>  - Exclude file system types from the slocate database
                        when using the -u or -U options. (ie. NFS, etc).
  -l <level>        - Security level.
                          0 turns security checks off. This will make
                            searchs faster.
                          1 turns security checks on. This is the default.
  -q                - Quiet mode.  Error messages are suppressed.
  -n <num>          - Limit the amount of results shown to <num>.
  -i                - Does a case insensitive search.
  -r <regexp>
  --regexp=<regexp>  - Search the database using a basic POSIX regular
                        expression.
  -o <file>
  --output=<file>    - Specifies the database to create.
  -d <path>
  --database=<path>  - Specfies the path of databases to search in.
  -h
  --help            - Display this help.
  -v
  --verbose          - Verbose mode. Display files when creating database.
  -V
  --version          - Display version.

Author: Kevin Lindsay
Bugs:  klindsay@mkintraweb.com
FTP:    ftp://ftp.geekreview.org/slocate/
        ftp://ftp.mkintraweb.com/pub/linux/slocate/
HTTP:  http://www.geekreview.org/slocate/



Has several advantages ... a central config file
with prune-paths and file-systems being only one
of them ;)

The "normal" locate, run without parameters, will
put everything under the current path in locates
database, so make sure you change to / before
you run it.


Cheers,
Tink


All times are GMT -5. The time now is 10:35 PM.