Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
15 Cards in this Set
- Front
- Back
What does "last" do?
|
It shows logins, in reverse chronological order
|
|
What are the 3 reasons filters are important?
|
The output from a command may be very large, filters may reduce & refine the result Organizing data Reformatting |
|
What is the general definition of a Filter?
|
-receives input from stdout of cmd's -transforms output -writes output to stdout or through redirection |
|
What does ls | wc -l do?
|
counts the number of files in the directory
|
|
what does wc -l abc.txt do?
|
Counts # of lines in file abc.txt
|
|
What longer method can do the same as ls | wc -l?
|
ls > tempfile wc -l tempfile rm tempfile |
|
What do pipes do that sets them apart from Redirection? (even though pipes are technically a form of redirection)
|
They send output from a Unix command to another Unix command Redirect sends thing between files and screen |
|
What does head do?
|
It outputs the first part of files head [options] filename -cn (print the first n characters) -n (print first n lines) |
|
What does tail do?
|
Outputs the last part of files same usage as head |
|
What does more do?
|
displays files on a page-by-page basis -n number of lines to show -d prompt to continue |
|
What does less do?
|
Similar to more, but with more options
|
|
What does sort do?
|
Sorts lines of text [files] Format: sort [options] -t: -k 5,5 uses colon as field delimiter and sorts on the 5th field. -nu sorts numerical order |
|
What does uniq do?
|
removes duplicate adjacent lines from a file. uniq [options] filename -c : count the instances -d : print only the duplicates (once) -u : print only the unique lines -n : ignore first n fields ex. sort abc | uniq -c # |
|
What does wc do?
|
prints the number of newlines, words, and characters in files wc [options] filename -c : lines -w : words -l : characters |
|
What does cut do?
|
Removes columns or fields from a file cut [options] filename -c list : list of columns to cut -f list : list of fields to cut -d char : the delimiter for fields. Only one delimiter may be specified (tab is default) -s : suppress lines without delimiters |