Video may be blocked due to browser extensions. In the article you will find a solution to this problem.
Important notes
- Redirections operate on standard input and output (STDIN, STDOUT). Read more about standard input/ouput here or just google "unix stdin stdout".
- In addition to
>, which directs an output into a file, there is also>>, which appends the file, or, in other words, adds stuff to the end of the file. -
wcis used to count characters, words and lines.wc -lcounts lines only. -
uniqeliminates repeated lines (outputs the file with adjacent identical lines collapsed to one). It only works when repeated lines come together in a single continuous block. Example:sort file.txt | uniq
Lesson notes
>to redirect an output into a file (e.g.ls /var/logs > logs.txt)<to redirect a file (e.g.sort < names.txt)|to connect two commands with a pipe (e.g.ls | grep)