There are no .bmp files in ~cs50/pset4 to test with peek. How can I copy .bmp files from my workspace to ~cs50/pset4?
You don't need to copy anything into the
/home/cs50 directory. Just provide the correct pathnames to all the files.
peek executable binary is in the
cs50 user's home directory, so you need to specify the path:
But when you provide the arguments to
peek, you are going to provide bitmaps that are in your home directory!
If you are comparing two files in your current working directory, the usage is:
~cs50/pset4/peek foo.bmp bar.bmp
bar.bmp are files in the current working directory.
Just to be absolutely crystal clear, I will spell it out with absolute pathnames. This is another way of saying:
/home/cs50/pset4/peek /home/ubuntu/workspace/pset4/bmp/foo.bmp /home/ubuntu/workspace/pset4/bmp/bar.bmp
Every command that you execute has a full pathname leading to the location where the executable file is stored in the file system. To illustrate this, you can use the
which ls which man which which
If you can run the command without supplying the absolute or relative pathname to its executable, that means the path to the file is in the
$PATH environment variable:
Hope this helps.
Possible duplicate of this question.