Topic 3: The power of the command line Flashcards
what command would you use to unpack this file: archive.tar?
tar xf archive.tar
what two utilities could be used to print the contents of a file to the screen?
cat and less
what is the format for a loop?
for i in { blank }; do echo $; done
what is a valid if statement?
if [ blank ]; then echo $; fi
what does an exit status of 1 indicate?
there was an error with the command
what does an exit status of zero indicate?
the command ran successfully
purpose of the command tar
create, update, list and extract archives. could also compress a group of files into an archive for backup
4 popular tools for compression
gzip, bzip, xz, and zip
what is the channel number for standard input?
channel zero
what is the channel number for standard output?
channel 1
what is the channel number for standard error?
channel 2
what is a bit bucket and an example?
a file that accepts input and doesn’t do anything with it.
example: /dev/null folder
what is the purpose of the command grep?
to search for a pattern or string
purpose of the command less
print contents of a file to the screen like man pages. user can scroll up and down a line at a time