LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Where are the files located? (https://www.linuxquestions.org/questions/linux-newbie-8/where-are-the-files-located-511696/)

cder 12-18-2006 03:29 PM

Where are the files located?
 
Hi,

Where are the files such as Text Editors stored in Linux? I am using Fedora 5 and I am trying to use the command to run certain files.

Thanks.

ethics 12-18-2006 03:46 PM

most executable binaries are stored in /bin /sbin (intended to be run by super user) /usr/bin etc.

the structure takes a bit of getting used to, but once you get it, it's simple. Check my sig for a guide on the different directories.

there are certain commands that can aid you too

Code:

whereis <command>
will tell you where it is (providing it's in the path, which can be seen with echo $PATH)

Code:

find / -name "<file>"
will search / for files named as specified

gilead 12-18-2006 03:50 PM

EDIT: ethics has covered all you need. The following are just some more commands for locating files:

It varies. For example on my system, there's /opt/kde/bin/kate and /usr/bin/vim. Since the programs you're looking for are executable and probably on your path, you can type (for example) which vim to see where it's located.

You can also use slocate, for example slocate vim will list the files with vim in the filename. You could also use a regular expression, slocate -r vim$ will return all of the files with names ending in vim.

cder 12-18-2006 08:39 PM

Steve,

I tried to use slocate but got:

bash: slocate: command not found

cder 12-18-2006 08:55 PM

These are what I did and got:

[root@localhost oracle]# whereis gcalctool
gcalctool: /usr/bin/gcalctool /usr/share/man/man1/gcalctool.1.gz

I am wondering what the second line means. It looks like two results in the single line seperated by a space. The first one "/usr/bin/gcalctool" of course would means the file name, or command? I could use this as a command to paunch the calculator.

What does the second part mean?
"/usr/share/man/man1/gcalctool.1.gz"

What is the extension of .gz?

Wim Sturkenboom 12-19-2006 12:05 AM

The second one is the manual page (on the commandline, use man gcalctool).

'gz' Is the extension for a gzipped file.

gilead 12-19-2006 12:50 PM

Quote:

Originally Posted by cder
bash: slocate: command not found

Try locate instead of slocate, although it looks like the other methods are finding the commands anyway.


All times are GMT -5. The time now is 06:17 PM.