Viewing, Creating, and Editing Files

Cat Command

  • Displays the contents of Hey.txt.

cat Hey.txt 

Overwrite

  • Creates or overwrites Hey.txt with the text Hello.

Append

  • Appends Hello again again to the end of Hey.txt.

Touch Command

  • The touch command is used to quickly create empty files, update timestamps of existing files, or check if a file exists in scripts.

Gedit Command

  • The command gedit hello.txt opens the file hello.txt in the Gedit text editor, allowing you to view or edit its contents in a graphical interface.

Nano Command

  • The command nano hello.txt opens the file hello.txt in the Nano text editor, allowing you to edit it directly in the terminal.

Last updated