Mostly all commands give output on screen or take input from keyboard, but it's also possible to send output to file or to read input from file.
There are three main redirection symbols
Redirector Symbol. Syntax:
Linux-command filename
To output Linux-commands result (output of command or shell script) to file. Note that if file already exist, it will be overwritten else new file is created.
$ ls > myfiles
Redirector Symbol. Syntax:
Linux-command filename
To output Linux-commands result (output of command or shell script) to END of file. Note that if file exist , it will be opened and new information/data will be written to END of file, without losing previous information/data, And if file is not exist, then new file is created.
$ date >> myfiles
Redirector Symbol. Syntax:
Linux-command filename
To take input to Linux-command from file instead of keyboard.