How to convert DOS line endings to Linux line endings in vim

0 votes

When I open the files I created in Windows, the lines all end with ^M.
How do I rid myself of these characters all at once?

May 24, 2019 in Linux Administration by Shubham
• 13,490 points
1,003 views

1 answer to this question.

0 votes

try this;

:%s/\r/\r/g
answered May 24, 2019 by Upasana
• 8,620 points

Related Questions In Linux Administration

0 votes
0 answers

How to convert a PDF into JPG with command line in Linux?

What are fast and reliable ways for ...READ MORE

Apr 14, 2022 in Linux Administration by Aditya
• 7,680 points
580 views
0 votes
0 answers

How can I convert a series of images to a PDF from the command line on linux?

I have a scanning server I wrote ...READ MORE

Apr 21, 2022 in Linux Administration by Edureka
• 13,690 points
584 views
–1 vote
1 answer

How to get octal file permission in linux?

You can use this: stat -c "%a %n" ...READ MORE

answered Jan 3, 2019 in Linux Administration by Omkar
• 69,220 points
2,575 views
0 votes
1 answer

How to create a symlink in Linux?

To create a symbolic link, you can ...READ MORE

answered Feb 1, 2019 in Linux Administration by Omkar
• 69,220 points
1,196 views
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
1,184 views
0 votes
1 answer

How to enable python3 in vim?

You didn't tell us the platform you're ...READ MORE

answered Jan 21, 2019 in Python by SDeb
• 13,300 points
1,916 views
0 votes
1 answer

What is the difference between BASH and DOS?

The major difference between the BASH and ...READ MORE

answered Mar 8, 2019 in Others by Nabarupa
16,959 views
0 votes
1 answer

How to change the default shell in Linux?

1. Change the password file directly for ...READ MORE

answered May 24, 2019 in Linux Administration by Upasana
• 8,620 points
1,010 views
0 votes
1 answer

generating a list of files with their absolute path in Linux

If you find an absolute path to start with, ...READ MORE

answered May 16, 2019 in Linux Administration by Upasana
• 8,620 points
1,383 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP