Contents
How do I save and exit cat in Linux?
To save and exit press the CONTROL and d keys (CTRL+D).
How do you save a cat command?
To create a new file, use the cat command followed by the redirection operator ( > ) and the name of the file you want to create. Press Enter , type the text and once you are done, press the CRTL+D to save the file.