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
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.