LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-17-2015, 12:02 PM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Rep: Reputation: Disabled
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.
 
Old 01-17-2015, 12:25 PM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You can use find command for searching.

Code:
find / -type f -name "glut.h"
 
Old 01-17-2015, 12:32 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Most C header files would be in /usr/include ... libraries are in lib.
 
Old 01-17-2015, 01:12 PM   #4
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Original Poster
Rep: Reputation: Disabled
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?

Last edited by AlexBB; 01-17-2015 at 01:18 PM.
 
Old 01-17-2015, 01:19 PM   #5
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Original Poster
Rep: Reputation: Disabled
Where is the /usr/ directory?

Last edited by AlexBB; 01-17-2015 at 01:33 PM.
 
Old 01-17-2015, 04:49 PM   #6
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-17-2015, 07:01 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,872

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
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.
 
1 members found this post helpful.
Old 01-17-2015, 07:50 PM   #8
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Original Poster
Rep: Reputation: Disabled
Thank you. Very good. It is now working. A.
 
Old 01-18-2015, 08:34 AM   #9
joe_2000
Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 808

Rep: Reputation: 216Reputation: 216Reputation: 216
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
 
Old 01-18-2015, 12:22 PM   #10
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Mounting Remote Directories With SSHFS On Ubuntu 11.10 LXer Syndicated Linux News 0 12-06-2011 03:50 PM
LXer: What do Different Directories mean in Ubuntu LXer Syndicated Linux News 0 10-07-2011 02:20 PM
How to grant permission and access to directories using ubuntu? JCole123 Linux - Newbie 4 07-14-2010 11:50 PM
LXer: Encrypted private directories coming to Ubuntu LXer Syndicated Linux News 0 08-10-2008 11:00 AM
How to go into some directories in UBUNTU from 'My Computer' EasyLife Ubuntu 2 08-03-2008 09:20 AM


All times are GMT -5. The time now is 05:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration