• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/25

Click to flip

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;

25 Cards in this Set

  • Front
  • Back
1) Which of the following are valid shells that are available in Linux?
a) /bin/bash c)/bin/ksh d) /bin/tcsh
2) Which of the following files are executed when you start another shell following login?
c) ~/.bashrc
3) Which of the following files could you edit to create a variable that must exist in all shells that are started by users on your system?
b) /etc/profile
4) You have just edited your ~/.bashrc file and added a line that loads a variable. How can you read this file into your current shell environment?
a) .~/.bashrc d) source~/.bashrc
5) Which of the following may be used to protect the $ character in the phrase $DIR from being interpreted specially by the bash shell?
a) \$DIR b) '$DIR'
6) You wish to recall a previous command that starts with the letters "cron". After you type the letters "cron" on the command line, what key combination could you use to search the command history for previous commands that start with "cron"?
Ctrl + R
7) Which key may be used to complete the name of a file or directory on the command line?
b) tab
8) Which of the following commands can be used to view the contents of the $NOVELL variable?
b) echo $NOVELL
9) What command could you use to create a variable called TEST that is available to child processes in subshells?
export TEST= "test"
10) What function call is used by a shell to create a subshell for program execution?
export
11) Which of the following commands may be used to view all shell and environment variables on the system?
c)set
12) What command could you use to create an alias called c that runs the clear command in your current shell?
alias c = 'clear'
13) Which of the following files are best suited to storing aliases?
b)~/.aliases d) /etc/bash.bashrc
14) Which command can be used to view all files in the /etc directory that are three characters long and start with either A or B?
a) Is /etc/[AB]??
15) Which of the following output redirection symbols will not overwrite an existing file?
d)>>
16) What command could you enter at a command prompt to view a long listing of files in the /proc directory and save the stdout and stderr to the file results in your current directory?
cat /proc
17) Which of the following demonstrates correct syntax?
b) command > file d) command|command
18) Which device file can you redirect stderr in order to ignore stderr completely?
/dev/null
Which of the following will run the command echo "I found it!" only if the command grep localhost /etc/hosts is successful?
d. grep localhost /etc.hosts || echo "I found it!"
What command accepts information from stdin and sends it to both a file and stdout?
tee
21) which key can you use to switch from command mode to insert mode in the vi editor?
b) i or INSERT
22) Which key sequence in the vi editor will allow you to save your changes and quit?
a) :wq c):x
23) What sed command would you use to replace all occurences of the word mom with dad in the file letter?
sed 's/mom/dad/g' /letter
24) What sed command would you use to delete all lines that begin with a # character in the file /etc/samba/smb.conf?
sed 'd
25) What awk command would you use to print the third and fifth fields of the colon delimited /etc/passwd file?
awk 'BEGIN {FS = ":"}{print NR, $3, $5} END