Viewing Text and Redirecting Output Flashcards
What command is a used as a file perusal filter for crt viewing.
more
What command provides a filter for paging through text one screenful at a time?
more
What command outputs the first part of files? And what option specifies the number of lines to print rather then the default of 10?
head
-n
What prints lines matching a pattern?
grep
What are notable options of grep?
-i which ignores case
-R which reads files under each directory recursively
A text viewing utility similar to more but provides more features (allows backward movement)
less
What outputs the last part of files
tail
What does the -n and -f option do for tail
-n option specifies the number of lines and -f is used to append data as the file grows (a log file)
Sort lines of text files
sort
The standard input stream
0 stdin
The standard output stream
1 standout
The standard error stream
2 stderr
Output redirection symbols
> > >
Input redirection
< «
Error Redirection
2>