Viewing, Creating, and Editing Files
Cat Command
Displays the contents of
Hey.txt.
cat Hey.txt 
Overwrite
Creates or overwrites
Hey.txtwith the textHello.

Append
Appends
Hello again againto the end ofHey.txt.

Touch Command
The
touchcommand 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.txtopens the filehello.txtin the Gedit text editor, allowing you to view or edit its contents in a graphical interface.


Nano Command
The command
nano hello.txtopens the filehello.txtin the Nano text editor, allowing you to edit it directly in the terminal.


Last updated