How would you write a test that says if /tmp/foo is a directory or USERS is greater than 5?
Answer - test -d /tmp/foo -o $USERS -gt 5
Linux
- What is the meaning of $(( $i + 1)) ?
- A conditional that lets you make multiple comparisons with a pattern is called:
- The if command looks for what exit code to consider a condition to be true?
- Given the following script that is run through ./test.sh hello goodbye:
- Which of the following are correct about for and while loops?
- What does this shell script do?
- A file begins with #!/bin/csh. This means:
- The echo command:
- The command echo "text" >> file.txt will not overwrite file.txt if it already exists.
- The command echo "text" > file.txt will create file.txt if it does not already exist.
- Which option for the wc command will print the number of lines in a file?
- Which of the following commands scans the file to determine file locations?
- Which of the following commands can be used to scroll through a text file?
- Which of the following commands will display lines that contain either start or end?
- Which of the following commands will display only lines that begin with test?
- The grep command...
- Which option of the head command will display only the first five lines of a file?
- Which two commands do the same thing?
- The three main modes of tar are:
- You try to compress a file that is already compressed. Which of the following statements is true?
- Which of the following commands will create a zipfile with the contents of your Documents directory?
- In the command tar cvjf foo.tbz a b c, what are a, b, and c?
- Lossy compression:
- In general, which of the following would you want to use lossless compression?