OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

3.4.1. Displaying and Modifying Text Files‌


The cat file command (intended to concatenate files to the standard output device) reads a file and displays its contents on the terminal. If the file is too big to fit on a screen, you can use a pager such as less (or more) to display it page by page.

The editor command starts a text editor (such as Vi or Nano) and allows creating, modifying, and reading text files. The simplest files can sometimes be created directly from the command inter- preter thanks to redirection: command >file creates a file named file containing the output of the given command. command >>file is similar except that it appends the output of the command to the file rather than overwriting it.


$ echo ”Kali rules!” > kali-rules.txt

$ cat kali-rules.txt

Kali rules!

$ echo ”Kali is the best!” >> kali-rules.txt

$ cat kali-rules.txt

Kali rules!

Kali is the best!

$ echo ”Kali rules!” > kali-rules.txt

$ cat kali-rules.txt

Kali rules!

$ echo ”Kali is the best!” >> kali-rules.txt

$ cat kali-rules.txt

Kali rules!

Kali is the best!


Top OS Cloud Computing at OnWorks: