Chapter 1 - Exploring Linux Command-Line Tools - Seat6 Flashcards
Three important commands used to combine two or more files into one file are?
pg.22
cat
join
paste
The cat command’s name is short for ________,
and what does it do?
pg.22
concatenate,
It links together an arbitrary number of files end to end and sends the results to standard output.
What does the join command do?
pg.23
combines 2 files by matching the contents of specified fields within the files. Fields are typically space-separated entries on a line.
What does the paste command do?
pg.24
merges files line by line, separating the lines from each file with tabs.
What does sed command do?
pg.25
it is an important file-transforming command.
What does the sort command do?
pg.26
allows you to sort an output file you created.
What are 5 different commands you can sort with?
pg.26
Ignore Case: -f or --ignore-case Month Sort: -M or --month-sort Numeric Sort: -n or --numeric-sort Reserve Sort order: -r or --reverse Sort Fields: -k or --key=field
What does the split command do?
pg.26
allows you to split a file into two or more files. This command requires you to enter an output filename or, more precisely, an output filename prefix, to which is added an alphabetic code.
What are the commands to specify how large you want the individual files split?
pg.26
Split by Bytes: -b size or –bytes=size
Split by Bytes by Line-Sized Chunks: -C=size or –line-bytes=size
Split by Number of Lines: -l lines or –lines=lines
What command changes individual characters and relies on standard input?
pg.27
tr command
What command is the logical opposite of expand and can convert multiple spaces to tabs?
pg.27
unexpand command
What command removes duplicate lines?
pg.28
uniq command
What command allows you to clean up a file by cleaning up paragraphs which it assumes are delimited by two or more blank lines or by changes in indentation?
pg.28
fmt command
What command will allow you to do more complex line numbering and numbering all the non-blank lines in a file?
pg.29
nl command
What command allows you to prepare a file with headers, footers, and page breaks?
pg.30
pr command