Cat 1
Cat 2
Cat 3
Cat 4
Cat 5
100
What is the process that runs a process in the current shell instead of a subshell?
Sourcing
100
What command displays the exit code of a command?
echo $?
100
This command is the quickest way to return to your home directory?
cd
100
What command shows the last 10 lines of foo.txt?
tail foo.txt
100
You justed plugged in a USB thumb drive. Under what directory will it appear?
/media/ or /run/media/
200
Name a virtual directory that contains kernel and process information.
/proc & /sys
200
What command reads a files header and matches it against known file types.
file
200
This command updates the time stamp of a file?
touch
200
What does this command do? cp file1 file2 file3 foo/
Copies files to directory foo/
200
Name a difference between locate and find.
find searches the filesystem. Locate searches a database.
300
What does the which command do? Be specific.
searches your PATH environment.
300
ls is ______ to `ls --color=auto' What is the missing word?
aliased
300
What is missing from this command? tar czvf ______ Docs
The tarball that will be created.
300
What does this command do? tar -tf foo.tar
Lists contents of foo.tar.
300
What command yields the highest compression? tar gzip bzip2
bzip2
400
Which could you mount on a separate filesystem? /root /etc /var /home
/var /home
400
List two things you can do with a symlink that you can not do with a hard link.
1. Link to file on another filesystem. 2. Link to a directory?
400
What will redirect STDERR to /dev/null?
2> /dev/null
400
Which is the correct syntax? 1. cat foo > sort | foobar.txt 2, cat foo | sort > foobar.txt
2, cat foo | sort > foobar.txt
400
What does the && do? cd Pics/ && rm -f *.jpg
Runs the second command only if the first is successful.
500
You want to replace every instance of foo with foobar in bigfile.txt. Which command would you use? 1. grep 2. sed 3. find 4. locate
2. sed
500
What will the -v do here? grep -v "Mark Twain" twain.txt
Find all the lines that do not contain Mark Twain.
500
Which command will append STDOUT to foo.txt? 1. cat foobar > foo.txt 2. ls Pics/ >> foo.txt 3. cat foobar < foo.txt 4. ls Pics/ | foo.txt
2. ls Pics/ >> foo.txt
500
What will this command do? cut -f2 -d, foobar.csv
Display only the second field in foobar.txt.
500
Give the command that will display the last 4 lines of foo.txt.
tail -n 4 foo.txt