LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-23-2019, 03:01 AM   #1
parotta36
Member
 
Registered: Dec 2017
Location: Madurai
Distribution: Linux Mint | Slackware
Posts: 59

Rep: Reputation: Disabled
md5sum -c error


When I ran md5sum -c <md5file>, I get the following error
Code:
md5sum: 'f01.bin'$'\r': No such file or directory
: FAILED open or read
md5sum: WARNING: 1 listed file could not be read
The file contains,
Code:
8fc6e8a931da7d89kvpc0dff5a20d2a f01.bin
I know \r is carriage return, and I'm guessing it came from editing in a windows environment. There is nothing after the filename, when I open the file. I tried deleting and entering a new line, but the error persisted.


What is $'\r' and how do I md5check it successfully?

Last edited by parotta36; 02-23-2019 at 03:04 AM.
 
Old 02-23-2019, 03:04 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
\r probably means you edited/created this file in windows and it automatically put \r at the end of the line.
It is not needed in linux and md5sum thinks it is part of the filename.
you can use for example: od -xc <md5file> to check the content.
you can use the command dos2unix to convert files (on linux).
 
1 members found this post helpful.
Old 02-23-2019, 03:25 AM   #3
parotta36
Member
 
Registered: Dec 2017
Location: Madurai
Distribution: Linux Mint | Slackware
Posts: 59

Original Poster
Rep: Reputation: Disabled
Why doesn't it go away if I delete the newline and create a newline in Vim?
 
Old 02-23-2019, 03:32 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
because it is not a newline, but part of the line. It is an additional char. Just invisible.
https://stackoverflow.com/questions/...endings-in-vim
 
1 members found this post helpful.
Old 02-23-2019, 04:58 AM   #5
parotta36
Member
 
Registered: Dec 2017
Location: Madurai
Distribution: Linux Mint | Slackware
Posts: 59

Original Poster
Rep: Reputation: Disabled
Thanks!
I tried :%s/\r//g in Vim and it didn't work. I used :set ff=unix and saved it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] MD5Sum - How do I compute the MD5Sum of a downloaded iso? kd6tzf Linux - Newbie 13 01-29-2015 12:15 PM
md5sum error on suse 10.1 install h1ppy0 Linux - Newbie 1 01-16-2008 06:57 AM
Ubuntu Mplayer Install Error: Md5Sum mismatch racket24 Linux - Software 4 07-12-2005 04:47 PM
md5sum error Krogen Linux - Software 13 06-22-2005 09:40 AM
YOU md5sum error linux-rulz SUSE / openSUSE 1 12-21-2004 01:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration