ls -lrt | wc -l
This runs the ls -lrt command and sends it's output to the wc -l command as input. What will the output be?
ls -lrt > ls.out
runs the ls -lrt command and saves the output in a file called ls.out.
If the file exists, it is overwritten. If not, then it creates it.
date >> ls.out
runs the date command and saves the output at the end of a file called ls.out.
If the file does not exist, it creates it. If not, it adds the output to the end of the file.
grep "rwx" < ls.out
cat ls.out | grep "rwx"
cmd > file # output of cmd is stored in file
cmd1 | cmd2 # output of cmd1 become the input to cmd2