This is a recurring problem for me and it is very frustrating. ill make a file I'll start with ls cd and move just to see where its at. I'll get rid of it and make a new one. I'll refresh the file tree. Sometimes it'll work if I rename it but in this instance I need this file to be called population.c to turn it in. it still keeps telling me "no such file or directory". this is such a pain. i cant focus on actually writing the code that I'm supposed to be working on. it looks like this enter image description here

1 Answer 1


You keep having this problem because you don't always return to the directory where the file is made or moved to. Look to the left of the terminal line where you are working: the ~/ means your terminal is pointed at your home directory. From the directory tree at the left of the image, you can see that the file population.c is located at ~/pset1/hello. If you are not in that directory, or typing the full path to the file (~/pset1/hello/population.c), you cannot perform commands on the file.

  • i'm sorry i know you've explained this before. i got it now thank you
    – Aamon Van
    Mar 2, 2021 at 18:01
  • I will tell you the same thing I tell my students: never apologize for asking questions, even if it's the same question, as long as you are trying to learn; only ever apologize for not trying. You are learning many new things, many of which assume you have mastered the concept(s) that came before almost immediately. The terminal is not complicated, but it can be foreign and will take time to get used to (at which point you won't be able to understand how you had those issues to begin with) :). Mar 2, 2021 at 18:30
  • much needed reassurance :)
    – Aamon Van
    Mar 2, 2021 at 20:12

You must log in to answer this question.

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