LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ubuntu directories (https://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-directories-4175531325/)

AlexBB 01-17-2015 11:02 AM

Ubuntu directories
 
Hi there. I have Ubuntu 14.04 installed. Actually I have been doing a lot of work in this OS for about a year. The thing I cannot still comprehend is how to find files I installed. In this particular case I need glut.h for g++ compiler. So I go here, do this command;

Code:

sudo apt-get install freeglut3-dev
And find out that I already have the newest version (which I have suspected since I recall installing it).

So, the next step is to find the glut.h file and reference it with #include command. I cannot find it anywhere. This website says it has to be here:

Code:

/usr/lib/x86_64-linux-gnu/libglut*
Why's the asterisk? Is it a footnote or part of the code?

I don't seem to have /usr/ directory. I cannot find it anywhere.

How does Ubuntu directory work?

Thanks, - A.

veerain 01-17-2015 11:25 AM

You can use find command for searching.

Code:

find / -type f -name "glut.h"

btmiller 01-17-2015 11:32 AM

Most C header files would be in /usr/include ... libraries are in lib.

AlexBB 01-17-2015 12:12 PM

alex@alex-....:~/GFORTRAN-APPS/SPHERE-DESIGN$ find / -type f -name "glut.h"
find: `/run/udisks2': Permission denied
find: `/run/lightdm': Permission denied
find: `/run/cups/certs': Permission denied

Why is it so? I am the administrator on this machine. I installed this OS. I also think veerain misdialed the command. It seems to be:

Quote:

findg / -type f -name "glut.h"
The answer: No such file or directory.

This I also got:

Quote:

No command 'find:' found, did you mean:
Command 'findg' from package 'ncl-ncarg' (universe)
Command 'find' from package 'findutils' (main)
Command 'findv' from package 'polylib-utils' (universe)
find:: command not found
I also tried this:

Command 'find' from package 'findutils' (main)

Quote:

sudo apt-get install findutils
It is already there. Nothing was installed.

Where is the /usr/ directory?

AlexBB 01-17-2015 12:19 PM

Where is the /usr/ directory?

AlexBB 01-17-2015 03:49 PM

OK, I just installed Qt library or whatnot. Then I issued some commends I found here. See what happened:

Quote:

alex@.....:~/GFORTRAN-APPS$ which qmake
/usr/bin/qmake
alex@alex....:~/GFORTRAN-APPS$ qmake -version
QMake version 2.01a
Using Qt version 4.8.6 in /usr/lib/i386-linux-gnu
It tells me that the library is in /usr/ subdirectory. Where is it? Why is it such a crazy mystery? I cannot find /usr/ anywhere.

yancek 01-17-2015 06:01 PM

Quote:

Why's the asterisk? Is it a footnote or part of the code?
It means to find and file in that directory beginning with libglut, so if you had a libglut1, libglut2, etc. they should all show.

Quote:

Where is the /usr/ directory?
In the terminal type: ls / That will show you all the directories in the root of the filesystem including usr.
If you are in a filemanager, use the up arrow to get to the root of the system. There are standard directories on Linux and they are listed under / alphabetically.

Run the find command as root, preface it with sudo. The prompt in your earlier post (#4) clearly shows you are running it as a normal user.

AlexBB 01-17-2015 06:50 PM

Thank you. Very good. It is now working. A.

joe_2000 01-18-2015 07:34 AM

For finding files on the whole filesystem locate is very useful. You may need to install it first
Code:

sudo apt-get install locate
To be able to start using it first needs to create an index of your hard drive. It does that automatically through cron, but you can start the process right away by typing
Code:

sudo updatedb
This may take a while, but once that is done you can simply type e.g.
Code:

locate glut.h
You'll find that it is faster then find when you search the whole disk and I personally also think it's easier to use if you are not used to the find syntax

AlexBB 01-18-2015 11:22 AM

Cherry 2000 :-), sorry, Joe_2000, thank you. I used the first command and it installed locate as was reported. Locate works now. - A.


All times are GMT -5. The time now is 05:20 PM.