Learn About Computers

Teaching about Computers

    12. Nano Files


    Posts : 96
    Join date : 2018-03-24

    12. Nano Files Empty 12. Nano Files

    Post by Aof on Fri May 18, 2018 4:17 am

    12. Nano Files
    1. cd ~/Desktop = navigates to root user's Desktop.
    2. nano textfile = to create a nano file called textfile, the file will not be created until you save it.
    3. Ctrl+O = Pressing this after writing in a note in the nano editor, prompts the user to save the nano file.
    4. Enter Key = saves the file.
    5. Ctrl+X = exits the nano editor.
    6. You can double left click the file in your Desktop to open it in your default text editor.
    7. cat textfile = the file can also be viewed from within the terminal from your present working directory.
    8. cat ~/Desktop/textfile = You can cat the file from a different directory by entering the full path of the file.
    9. cd ~/Desktop = navigates to Desktop
    10. mv textfile test/textfile = creates a folder for the text file and moves it at the same time.
    11. cd test;ls = navigates to testfolder and lists the contents.
    12. less textfile = to view the contents a small version of it without cluttering up your terminal, you can press "q" to quit.
    13. cd ~/Desktop = navigates to Desktop
    14. cat mlist | more = press enter to scroll down, and "q" to exit.
    15. touch text2 = creates an empty text2 nano file, later when you feel like it you can nano it to put content inside it.

      Current date/time is Wed May 22, 2019 11:16 pm