0

I'd like to compare the files I'm resizing with the original but peek will not work. It keeps on telling me that it can't open the file. What's going on?

@ide50:~/workspace $ ~cs50/pset4/peek small.bmp Could not open small.bmp. @ide50:~/workspace $ ~cs50/pset4/peek student.bmp staff.bmp Could not open student.bmp. @ide50:~/workspace $ ~cs50/pset4/peek small.bmp Could not open small.bmp.

I get the same result when I specify the paths, as in:

~cs50/pset4/peek ~/workspace/pset4/bmp/large.bmp
0

There are only two reasons that I can think of that would cause this error. Either the target file is not present in the directory given or the permissions are preventing it from being read. It's a safe bet that you haven't changed the permissions, so it's probably that peek can't find the file.

Looking at your example:

@ide50:~/workspace $ ~cs50/pset4/peek small.bmp Could not open small.bmp.

it tells me that you are in the directory ~/workspace and not ~/workspace/pset4/bmp, so that command will not find small.bmp. You need to be in the same directory as the target file, or give the correct fully qualified path name to the target. Any errors in that path and it fails. You can verify the presence of the target with the ls command for the local directory, or with ls followed by the path name that you're trying to use to get to the target file.

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

You must log in to answer this question.

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