Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello all, and sorry in advance if this is the wrong place for this question.
I am an extremely inexperienced user of command line computing (I am working with Terminal.app on Mac OS X Snow Leopard) who is trying to compile Fortran code with the G95 compiler. I have created a folder within the G95 directory that I would like to use for storing all of my code files, but when I try to cd from the G95 directory to the new one that I created, I get the above error. I can cd to other folders within the G95 directory, and have tried all combination's of capitalization.
Any help or insight, or advice on how to learn this stuff better would be greatly appreciated.
The error message is quite clear. First thought coming in mind is that you're trying to change to a really non-existent directory or you're not typing the directory name correctly. Please, show us what's going on, e.g. go to G95 directory and try the following:
Code:
pwd
to print the full path of the current working directory, and
Code:
ls -F
to see what files and directories are inside it. Copy/paste the result here and tell us exactly which directory you're trying to enter.
could the fact that linux is case sensitive have to do with it? but yea the error message is straightforward, the file doesnt exist where you need it to be.
so if you are in the G95 directory and you ware wanting to go to folder1 that is inside the G95 directory, how are you moving to that folder?
Code:
cd /folder1
or
Code:
cd folder1
the 2nd should be how you move to the folder from INSIDE G95. But I would definately list all the directories inside G95 before trying to go inside. You may have inadvertantly typed a wrong character that would prevent you from accessing it. So follow above advise and
It's either the wrong case (L != l) or the directory you are trying to change to really doesn't exist (don't worry, we've all been there). In case you didn't know (I'm guessing you do, but just if you don't), cd means change directory.
It's either the wrong case (L != l) or the directory you are trying to change to really doesn't exist (don't worry, we've all been there). In case you didn't know (I'm guessing you do, but just if you don't), cd means change directory. Make sure the file exists either by browsing for it in a file browser (I have no idea what it is on a mac) or ls (list) in that directory
1. The directory does not exist
2. The directory is not named what you think it is
3. You are not in the directory where you think the directory is
or
4. The directory is not where you think it is
pwd will show you where you are
ls will show you what is in the directory you are in
find will help you locate the directory
I'm pretty sure the directory I want to change to exists, since I created it yesterday using the Mac OS X file browser (it's called Finder). Here it is in Terminal.app:
BenardLenards-MacBook-Pro:~ BenardLenard$ ls
Desktop G95 Movies Public
Documents Library Music Sites
Downloads Misc. Pictures USGSAPPS
BenardLenards-MacBook-Pro:~ BenardLenard$ cd g95
BenardLenards-MacBook-Pro:g95 BenardLenard$ ls
Fortran Code Files INSTALL lib
G95Manual.pdf bin
BenardLenards-MacBook-Pro:g95 BenardLenard$ cd Fortran Code Files
-bash: cd: Fortran: No such file or directory
BenardLenards-MacBook-Pro:g95 BenardLenard$ cd bin
BenardLenards-MacBook-Pro:bin BenardLenard$ ls
i386-apple-darwin8.11.1-g95
BenardLenards-MacBook-Pro:bin BenardLenard$ cd ..
BenardLenards-MacBook-Pro:g95 BenardLenard$ cd lib
BenardLenards-MacBook-Pro:lib BenardLenard$ ls
gcc-lib
BenardLenards-MacBook-Pro:lib BenardLenard$ cd ..
BenardLenards-MacBook-Pro:g95 BenardLenard$ ls
Fortran Code Files INSTALL lib
G95Manual.pdf bin
BenardLenards-MacBook-Pro:g95 BenardLenard$ cd Fortran Code Files
-bash: cd: Fortran: No such file or directory
BenardLenards-MacBook-Pro:g95 BenardLenard$
Here I have navigated into the G95 directory (which does not appear to be case sensitive) and attempted to change directory to the "Fortran Code Files" directory twice without success, while I was successfully able to change directory to the "lib" and "bin" directories within G95.
I was now successfully able to change to the directory (used quotation marks around the multi-word directory name), compile a code file, and then run the output file (I used "./a.out" where "a.out" is the name of the output file). Can anyone tell me what the ./ means or if there are other ways to run executables?
Also, if I remove a file from a directory with the "rm" command, where does it go?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.