1

I'm having a problem checking certain .md5 files, they are all files that are in directories which have been renamed since the files were downloaded.

[User1 Directory X]$ md5sum -c file1.txt.md5
md5sum: directoryx/file1.txt: No such file or directory
directoryx/file1.txt: FAILED open or read
md5sum: WARNING: 1 listed file could not be read

I noticed the difference in the name of the directory that I am in vs the directory md5sum is looking in. The directory was either renamed (not by me!) since the files were downloaded, or the individual files were downloaded to this directory rather than the entire directory being downloaded at once. I edited the directory name to match but this didn't solve the issue.

[User1 directoryx]$ md5sum -c file1.txt.md5
md5sum: directoryx/file1.txt: No such file or directory
directoryx/file1.txt: FAILED open or read
md5sum: WARNING: 1 listed file could not be read

Any help on how to fix this?

1

It seems (from your prompt) that the file is located in the correct directoryx, but since md5sum will try to read the file at the path given by the .md5 file, and since you are in directoryx, it won't find it.

Move one level up in the directory hierarchy and use

$ md5sum -c directoryx/file1.txt.md5
0

I had the same issue and was able to fix it by opening the md5 file and deleting the original path that pointed to the file. Or you can add a new path if the target file is in a different location.

$ vi file.fastq.tar.gz.md5

alphaNumericalKey this/was/original/path/file.fastq.tar.gz

Change the above line to:

alphaNumericalKey file.fastq.tar.gz

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.