LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   md5sum rejecting, than accepting file sums (https://www.linuxquestions.org/questions/linux-newbie-8/md5sum-rejecting-than-accepting-file-sums-4175463162/)

el848484 05-23-2013 09:35 AM

md5sum rejecting, than accepting file sums
 
This is what's happening:
--------
$ ls -l
total 8
-rw-rw-r-- 1 idb idb 53 May 23 10:13 file1
-rw-rw-r-- 1 idb idb 60 May 23 10:13 file2

$ md5sum -b * > ../PMmd5

$ more ../PMmd5
727036f6e7f9abf9e48120f0861e1b73 *file1
2e4ee3e386d70e972904aae7dac4a191 *file2

$ md5sum -c * ../PMmd5
md5sum: file1: no properly formatted MD5 checksum lines found
md5sum: file2: no properly formatted MD5 checksum lines found
file1: OK
file2: OK

$ uname -a
Linux monaco.jefferson.edu 2.6.18-164.el5PAE #1 SMP Tue Aug 18 15:59:11 EDT 2009 i686 i686 i386 GNU/Linux
$ more /etc/redhat-release
Red Hat Enterprise Linux Server release 5.9 (Tikanga)
--------
What am I doing wrong? Any ideas appreciated.

Don

$

druuna 05-23-2013 10:22 AM

Quote:

Originally Posted by el848484 (Post 4957266)
$ md5sum -c * ../PMmd5
md5sum: file1: no properly formatted MD5 checksum lines found
md5sum: file2: no properly formatted MD5 checksum lines found
file1: OK
file2: OK

You are using the wrong command syntax, it should be:
Code:

md5sum -c ../PMmd5
The misplaced * in your command will expand the files present in the directory and these are expected to be files holding md5sum info (the -c switch) by md5sum. That's where the error/warning is coming from.

rknichols 05-23-2013 10:23 AM

Quote:

Originally Posted by el848484 (Post 4957266)
Code:

$ md5sum -c * ../PMmd5
md5sum: file1: no properly formatted MD5 checksum lines found
md5sum: file2: no properly formatted MD5 checksum lines found
file1: OK
file2: OK


Do not include the "*". The only filename arguments that "md5sum -c" expects are the names of files containing checksums. The names of the files to be checked are included within the lines of the checksum file (or files).

el848484 05-23-2013 10:29 AM

I was afraid it was something stupid like that. Thanks for your help.


All times are GMT -5. The time now is 07:15 PM.