0

Currently I am in Week4 - pset3 and tried to open from terminal the staff's solution as follows: (/Dropbox/pset3/breakout): cs50/pset3/breakout I get the following: -bash: cs50/pset3/breakout: no such file or directory

I could not see earlier staff solutions too(probably for the same root cause). The answer to a similar question in Stack Exchange did not help me to find a solution.

Where am I going wrong?

2

You're trying to open a file in a subdiectory that starts in the current directory. It isn't there. Try adding the leading ~ character:

~cs50/pset3/breakout

If you're satisfied with this answer, please mark your question as answered. Let's all do the housekeeping on the forum. ;-)

8
  • I understood that the required subdirectory is not in the current directory that I was using. When I added the leading tilde character, it worked fine. Thank you very much for the help. Apr 11 '15 at 13:10
  • I am coming back since my understanding still needs to improve. What I understood is that the command ~cs50/pset3/breakout leads me to the /home/pset3 directory and opens up the breakout file giving me staff's solution of the breakout game. Apr 16 '15 at 4:19
  • I am coming back since my understanding still needs to improve. What I understood is that the command ~cs50/pset3/breakout leads me to the /home/pset3 directory and opens up the breakout file giving me staff's solution of the breakout game. However, a later instruction says, in order to get staff's implementation, I need to go via ~cs50/pset3/breakout/breakout. It is not clear where this chain of command will lead me to. On trying to use this command, I get -bash: /home/cs50/pset3/breakout/breakout: Not a directory. In this case, what I have to understand? Your clarification will help me. Apr 16 '15 at 4:36
  • Perhaps some clarification will help. If you were to enter cs on a command line with no parameters, it will take you to the user home directory. In reality, that directory is /home/jharvard and is identified by '~'. There are two more directories above it - the root directory or '/' and the home directory, or /home. Type cd .. to get to the parent of the current directory, or cd / to get to the root directory. To get to the cs50 directory, type cd ~cs50 to get directly to the home directory for user cs50. The ~cs50 directory is the /home/cs50 directory.
    – Cliff B
    Apr 16 '15 at 4:51
  • Unless you created one, there shouldn't be a /home/pset3 directory. There is probably a /home/cs50/pset3 and maybe a /home/jharvard/Dropbox/pset3. Also, the [path...]/breakout/breakout is probably a fully qualified file name. The path would be without the last "/breakout"
    – Cliff B
    Apr 16 '15 at 4:51

You must log in to answer this question.

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