RH 124 Chapter 4 Text Files
CL Assume you have the privileges, list the contents of both the /etc/shadow and the /etc/passwd files and redirect the output to the file "total-user"
cat /etc/shadow /etc/passwd > total-user
CL Echo the text "End Of File" and append it to "total-user"
echo "End Of File" >> total-user
What is the stdin device?
keyboard
CL list recursively all the files in the root directory and redirect all errors to /dev/null
ls -R / 2>/dev/null
CL list recursively all the files in the root directory and redirect all errors to /dev/null and the error free output to the file "data"
ls -R / 2>/dev/null > data
CL List in long for the /etc/directory and pipe it to less.
ls -l /etc|less
CL List the files in the /etc directory and redirect the stdout to overwrite or create a file named "file-list"
ls /etc > file-list
CL List the files in the /etc directory and redirect the stdout to append or create a file named "file-list".
ls /etc >> file-list
What is the stderr device?
monitor
What is the stdout device?
monitor
CO What is the name of the editor used in class?
vi