0

I made the directory.

mkdir ~/pset1/hello/
cd ~/pset1/hello/

now ls isn't giving me a.out so i cant compile. it says "no such file or directory" pretty sure i did that. I've made probably about 100 codes work for me but im stuck here too. please help

3
1

In the image you provided, the pset1 directory in the directory tree to the left of the IDE is collapsed--notice how the arrow is pointing to the directory's folder and not down, as the arrow next to your home directory (~/) does. All of the files you see in the directory tree are currently in your home directory and not in ~/psetl/hello, which is empty probably based on ls not providing any output. You could get a better idea if there is anything in the directory, including hidden, files by running ls -al, which will provide output, even if the only options in the directory are to go back to the parent directory (../).

I see that you have a filed already in your home directory called hello.c. You can move this to the correct directory by typing mv ~/hello.c ~/pset1/hello into your terminal, or creating a new file in the correct directory by typing touch ~/pset1/hello/hello.c. I have included full paths for these commands so that they work no matter what directory you execute them in.

Once you have the files in the correct directories, you should be able to use the commands that are shown in the problem specification.

Hope this helps and let me know if you have any issues.

4
  • youre awesome thank you. id prolly fail this class if not for you.
    – Aamon Van
    Feb 27 at 0:19
  • haha it worked but then it put all my other files in my pset1. I'm going to monkey with it for a bit. i probably did something i didnt mean to
    – Aamon Van
    Feb 27 at 0:30
  • got it! thank you. i just made another directory and moved all my junk out of it. did you make "touch"?
    – Aamon Van
    Feb 27 at 0:43
  • If by "make" you mean "did I code the functionality," then the answer is no. touch is a core UNIX/Linux command that is 10 years older than I am. :) But, since I spend a decent amount of time in a terminal, I do use it often. Feb 27 at 2:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .