Mostly all command gives output on screen or take input from keyboard but in UNIX/LINUX it possible to send output to file or to read input from file. For e.g. $ls command gives output to screen; to send output to file of ls command, $ls>filename
It means put output of ls command to filename. There are 3 main redirection symbols >,>>,<
>
Syntax: command>filename
To output command result to file.
Note: that if file already exist, it will be overwritten else new file is created
Ex: $ls>myfile
It means put output of ls command to filename. There are 3 main redirection symbols >,>>,<
>
Syntax: command>filename
To output command result to file.
Note: that if file already exist, it will be overwritten else new file is created
Ex: $ls>myfile