How To Add Text To a Txt File In Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. Open the file you want to edit in a text editor. For example, type the following command to open a text file named “file.txt” in the vi editor: vi file.txt
2. Press the “i” key on your keyboard to enter insert mode, which allows you to add text to the file.
3. Type the text you want to add.
4. When you are done, press the “esc” key to return to command mode.
5. Type “:w” and press enter to save the file.
6. Type “:q” and press enter to exit the vi editor.