Reputation: 5832
Any ideas how to save a file edited with Nano, in "Mac format"? I keep getting DOS carriage returns in my newly-saved files on my Linux box. I provided a screen shot of the bottom menu when I go to "write out" file:
M-M Mac Format??? I see that there are save options when saving but cannot figure out how to execute them
M-M Toggle the use of Mac format
Thanks
Upvotes: 9
Views: 39113
Reputation: 1847
Normally you neither want to save as DOS format nor in Mac format. On Linux you should prefer the Unix format, therfore:
and the file will be saved with the default Unix line-endings (which is what you want on Linux):
Upvotes: 6
Reputation: 5832
The command "M-M" means "alt M". In fact, any command starting with "M" means the alt key. Some keyboards gobble up the alt key: in my case, on a Macbook Pro Retina, "esc" followed by "M" is what worked. More info here.
However, since your screenshot is showing [DOS Format]
as the current selection, the key combination you really want is "alt D" (or "esc" followed by "D"). That will toggle off [DOS Format]
so that you'll be saving your file with the default line-ending character (ASCII 0xA). Turning on [Mac Format]
will just give you a new set of problems.
Upvotes: 33