How do you symbolically link /usr/games/starwar with a file of the same name in
ID: 3540580 • Letter: H
Question
How do you symbolically link /usr/games/starwar with a file of the same name in your current directory?
Question 1 options:
1) ln . /usr/games/starwar
2) ln /usr/games/starwar .
3) ln -s . /usr/games/starwar
4) ln -s /usr/games/starwar .
Question 2 (1 point) Question 2 Unsaved
In the following command line
wc >file1 < file2
Question 2 options:
1) input for wc will come from file1
2) input for wc will come from file2
3) input for wc will come from keyboard
Question 3 (1 point) Question 3 Unsaved
How do you show lines 5 to 10 of file foo?
Question 3 options:
1) tail +5 foo | head
2) tail +10 foo | head -5
3) head foo | tail +5
4) head -5 foo | tail +10
Question 4 (1 point) Question 4 Unsaved
How do you know how many different users are logging into the system?
Question 4 options:
1) who | uniq | sort | wc -l | cut -d' ' -f1
2) who | cut -d' ' -f1 |sort | uniq | wc -l
3) who | uniq | sort | cut -d' ' -f1 | wc -l
4) who | wc -l | sort | cut -d' ' -f1
Question 5 (1 point) Question 5 Unsaved
Which one will you use to make sure that a process is killed?
Question 5 options:
1) kill -9
2) ctrl-C
3) kill -7
4) kill -8
Question 6 (1 point) Question 6 Unsaved
How to run a command in the background
Question 6 options:
1) put an '&' at the end of the command
2) put 2> at the end of the command
3) put ? at the end of the command
4) put ';' at the end of the command
Question 7 (1 point) Question 7 Unsaved
What can be put into the first line of your script to make sure a script will use the Bourne shell?
Question 7 options:
1) #!/bin/csh
2) #/bin/sh
3) #!/bin/sh
4) $/bin/sh
Question 8 (1 point) Question 8 Unsaved
Which special parameter indicates the name of the script?
Question 8 options:
1) $#
2) $?
3) $1
4) $0
Question 9 (1 point) Question 9 Unsaved
When you look for a pattern in files ignoring case which one will you use?
Question 9 options:
1) grep -v
2) grep -i
3) grep -e
4) grep -l
Question 10 (1 point) Question 10 Unsaved
Frame regular expression to match lines containing Mcgee Macgee mcghee magee.
Question 10 options:
1) [Mm]a?c?gh*ee
2) [Mm][ac]gh*ee
3) [Mm]a?c?gh?ee
4) [Mm]a*c*gh?**
Question 11 (1 point) Question 11 Unsaved
Which of the following represents an absolute path?
Question 11 options:
1) ~/bin/file1
2) /bin/file1
3) ./bin/file1
4) bin/file1
Question 12 (1 point) Question 12 Unsaved
Which of these commands will set the permissions on file textfile to read and write for the owner, read for the group, and nothing for everyone else?
Question 12 options:
1) chmod 046 textfile
2) chmod 640 textfile
3) chmod 310 textfile
4) chmod 710 textfile
Question 13 (1 point) Question 13 Unsaved
When you use the ln -s command, which of the following occurs?
Question 13 options:
1) a file is created that points to an existing file
2) a file is created that is a copy of an existing file
3) a file is moved from one location to another
4) a file is renamed
Question 14 (1 point) Question 14 Unsaved
Which command will print the contents of all files in the current directory whose names start with the character 'a' and end with a period ('.') followed by any two characters followed by a number?
Question 14 options:
1) ls a*.??[0-9]
2) ls a*.??#
3) cat a*.??[0-9]
4) cat a?.**#
Question 15 (1 point) Question 15 Unsaved
Which of these situations would cause an error message to be printed after typing the command my_script on the command line, assuming that my_script is a bash script?
Question 15 options:
1) my_script does not have execute permission set
2) the current working directory is not in the PATH
3) both a) and b)
4) neither a) nor b)
Question 16 (1 point) Question 16 Unsaved
In a bash script, how does one indicate the beginning and end of a block of statements in a while loop?
Question 16 options:
1) with { and }
2) with [ and ]
3) with while and elihw
4) with do and done
Question 17 (1 point) Question 17 Unsaved
To compare equality for two integers, val1 and val2, using test command (assuming bash script), you use
Question 17 options:
1) test val1 -eq val2
2) test val = val2
3) [ val1 = val2 ]
Question 18 (1 point) Question 18 Unsaved
What is the default list upon which a for loop operates in a bash script (i.e. a script contains for x rather than for x in y)?
Question 18 options:
1) the list of files in the current working directory
2) the list of currently running processes
3) the list of arguments to the script
4) the list 1, 2, 3, 4, ...
Question 19 (1 point) Question 19 Unsaved
Which of these is not a situation in which you could use regular expressions?
Question 19 options:
1) filtering of email coming from a particular internet domain name
2) calculation of student grades based on percentages
3) extraction of all transactions in a database with a customer number of 1000 or less
4) specification of the format of a string representing a zip code
Question 20 (1 point) Question 20 Unsaved
Which of the following is not a file stream opened automatically in a UNIX program?
Question 20 options:
1) standard input
2) standard terminal
3) standard error
4) standard output
Question 21 (1 point) Question 21 Unsaved
In UNIX, a process refers to what?
Question 21 options:
1) compiled source code
2) uncompiled source code
3) an executing instance of a program
4) an executable file
Question 22 (1 point) Question 22 Unsaved
System administration tasks must generally be performed by which username?
Question 22 options:
1) admin
2) root
3) sysadm
4) user
Question 23 (1 point) Question 23 Unsaved
How can you append the output of a command to a file?
Question 23 options:
1) command > file
2) command 2> file
3) command < file
4) command >> file
Question 24 (1 point) Question 24 Unsaved
If umask is set to 022, what is the default setting for a newly created directory?
Question 24 options:
1) Owner has read, write, execute rights, all the others can read.
2) Owner has read, write, execute rights, all the others can write.
3) Owner has read, write, execute rights, all the others can read and execute.
4) Owner has no rights, all the others can write.
Question 25 (1 point) Question 25 Unsaved
Which of the following command can extract from a tar file called game.tar
Question 25 options:
1) untar game.tar
2) tar xvf game.tar
3) tar -cvf game.tar
4) tar zvf game.tar
Question 26 (1 point) Question 26 Unsaved
The command grep computer /etc/* | more will show all files with the search word
Question 26 options:
1) etc
2) more
3) grep
4) computer
Question 27 (1 point) Question 27 Unsaved
Assuming file1 contains one column of data and file2 contains another column of data. To combine the data in file1 and file2 side by side and save the data in file3, we can use
Question 27 options:
1) cat file1 file2 > file3
2)
paste file1 file2 > file3
3) file3 = file1 + file2
4) cat file1 file2 >> file3
Question 28 (1 point) Question 28 Unsaved
what is missing from the unix command for looking for rose garden in all files in ~: grep rose garden ~/* | more
Question 28 options:
1) [ ]
2) " "
3) < >
4) nothing is missing
Question 29 (1 point) Question 29 Unsaved
The command
cut -f2 -d: data > temp
will write the second ___ of data table to temp
Question 29 options:
1) word
2) row
3) column
4) letter
Question 30 (1 point) Question 30 Unsaved
Which of the following command will find all the files named test in /
Question 30 options:
1) grep test /
2) grep -r test /
3) find / -name test -print
4) find -f test / 2> /dev/null
Explanation / Answer
How do you symbolically link /usr/games/starwar with a file of the same name in your current directory?
Question 1 options:
2) ln /usr/games/starwar .
Question 2 options:
3) input for wc will come from keyboard
Question 3 options:
1) tail +5 foo | head
Question 4 options:
4) who | wc -l | sort | cut -d' ' -f1
Question 5 options:
4) kill -8
Question 6 options:
1) put an '&' at the end of the command
Question 7 options:
4) $/bin/sh
Question 8 options:
4) $0
Question 9 options:
4) grep -l
Question 10 options:
1) [Mm]a?c?gh*ee
Question 11 options:
4) bin/file1
Question 12 options:
3) chmod 310 textfile
Question 13 options:
2) a file is created that is a copy of an existing file
Question 14 options:
1) ls a*.??[0-9]
Question 15 options:
4) neither a) nor b)
Question 16 options:
4) with do and done
3) [ val1 = val2 ]
Question 18 options:
4) the list 1, 2, 3, 4, ...
Question 19 options:
1) filtering of email coming from a particular internet domain name
Question 20 options:
4) standard output
Question 21 options:
3) an executing instance of a program
Question 22 options:
1) admin
Question 23 options:
4) command >> file
Question 24 options:
2) Owner has read, write, execute rights, all the others can write.
Question 25 options:
4) tar zvf game.tar
Question 26 options:
4) computer
Question 27 options:
3) file3 = file1 + file2
Question 28 options:
4) nothing is missing
Question 29 (1 point)
The command
cut -f2 -d: data > temp
will write the second ___ of data table to temp
Question 29 options:
4) letter
Question 30 options:
1) grep test /
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.