QUESTION 2 You have finished your thesis, and want to set the permissions so tha
ID: 3826889 • Letter: Q
Question
QUESTION 2
You have finished your thesis, and want to set the permissions so that it is hard to accidentally delete or overwrite the file.
Normally, if you were to type "rm Thesis.txt", it would just delete it without asking. Or, if you moved a file with the same name into the same directory as your original Thesis.txt, it would overwrite it with the new version.
Which command would change the permissions for a file called Thesis.txt so that you are less likely to delete or overwrite it by accident?
chmod a+w Thesis.txt
chmod a-w Thesis.txt
chmod o-rwx Thesis.txt
chmod a+rwx Thesis.txt
QUESTION 5
Which of the following are true statements?
Unix filenames cannot contain spaces or punctuation characters
Unix filenames don't require extensions like .txt or .doc to determine the file type or purpose.
Unix filenames cannot be longer than 8 characters
Unix filenames are case sensitive, meaning that upper case a lowercase are treated differently
QUESTION 6
Which of the following commands uses sort as a filter?
ls > sort > tail
cat /etc/passwd | sort | head
sort /etc/passwd | more
ps ax | wc > sort
QUESTION 7
True or False? Unix does not have a graphical user interface, and can only be operated by entering text commands.
True
False
QUESTION 9
Which line of the following output is a symbolic link?
Line 1
Line 2
Line 3
Line 4
QUESTION 10
On debian-based systems, which command will list currently installed software packages?
dpkg -l
pkg --list
list-packages
apt-get -l
QUESTION 11
What is the numeric or Octal version of the following permissions for a file? -rw- r-- r--
Or, put a different way: u=rw,g=r,o=r
655
755
644
311
QUESTION 13
You asked your team to collect the serial numbers of all your equipment for insurance purposes. Unfortunately some members of the team visited the same rooms and you are certain that some of the lists they sent in contain the same serial numbers.
Assuming you have three text files of serial numbers named "serials-andy", "serials-mary", and "serials-pat", how would you remove all the duplicate serial numbers?
(You can verify your answer by creating three files with these names, puting some random numbers in them with some duplicates, and trying the commands)
uniq serials-* | sort
cat serials-* | sort | uniq
uniq serials-andy | uniq serials-mary | uniq serials-pat
sort serials* | uniq -d
QUESTION 14
When you type "ls /usr/bin" to view a detailed list of available unix programs, the list is longer than the screen so much of it scrolls by quickly. How would you use a pipe to view it one page at a time?
a.less | /usr/bin
b.ls | /usr/bin | less
c.ls /usr/bin | less
d.ls /usr/bin > less
QUESTION 16
In the vi text editor, which sequence of commands will copy the current line and past a copy of it below? (go ahead and try these to find out!)
"D" then "p"
"yy" then "p"
"C" then "p"
"c" then "v"
QUESTION 20
What is an advantage of compiled programs over interpreted programs?
Complied programs don't have security vulnerabilities.
compiled programs
Compiled programs are more portable across different operating systems.
Compiled programs are easier to check for errors.
a.chmod a+w Thesis.txt
b.chmod a-w Thesis.txt
c.chmod o-rwx Thesis.txt
d.chmod a+rwx Thesis.txt
QUESTION 5
Which of the following are true statements?
a.Unix filenames cannot contain spaces or punctuation characters
b.Unix filenames don't require extensions like .txt or .doc to determine the file type or purpose.
c.Unix filenames cannot be longer than 8 characters
d.Unix filenames are case sensitive, meaning that upper case a lowercase are treated differently
QUESTION 6
Which of the following commands uses sort as a filter?
a.ls > sort > tail
b.cat /etc/passwd | sort | head
c,sort /etc/passwd | more
d.ps ax | wc > sort
QUESTION 7
True or False? Unix does not have a graphical user interface, and can only be operated by entering text commands.
True
False
QUESTION 9
Which line of the following output is a symbolic link?
Line 1: -rw-r--r-- 1 wbackman staff 640 May 16 2013 docproj_submitting.diff.txt Line 2: lrwxr-xr-x 1 wbackman staff 21 Jan 29 07:54 perf -> /var/log/performance/ Line 3: -rw-r--r-- 1 wbackman staff 29837 Dec 3 15:07 simple-web-request-ipv6.pcap Line 4: -rw-r--r-- 1 wbackman staff 102 Jul 30 2013 start-tftp.sh
Line 1
Line 2
Line 3
Line 4
QUESTION 10
On debian-based systems, which command will list currently installed software packages?
a.dpkg -l
b.pkg --list
c.list-packages
d.apt-get -l
QUESTION 11
What is the numeric or Octal version of the following permissions for a file? -rw- r-- r--
Or, put a different way: u=rw,g=r,o=r
a.655
b.755
c.644
d.311
QUESTION 13
You asked your team to collect the serial numbers of all your equipment for insurance purposes. Unfortunately some members of the team visited the same rooms and you are certain that some of the lists they sent in contain the same serial numbers.
Assuming you have three text files of serial numbers named "serials-andy", "serials-mary", and "serials-pat", how would you remove all the duplicate serial numbers?
(You can verify your answer by creating three files with these names, puting some random numbers in them with some duplicates, and trying the commands)
a,uniq serials-* | sort
b.cat serials-* | sort | uniq
c.uniq serials-andy | uniq serials-mary | uniq serials-pat
d.sort serials* | uniq -d
QUESTION 14
When you type "ls /usr/bin" to view a detailed list of available unix programs, the list is longer than the screen so much of it scrolls by quickly. How would you use a pipe to view it one page at a time?
a.less | /usr/bin
b.ls | /usr/bin | less
c.ls /usr/bin | less
d.ls /usr/bin > less
QUESTION 16
In the vi text editor, which sequence of commands will copy the current line and past a copy of it below? (go ahead and try these to find out!)
a."D" then "p"
b."yy" then "p"
c."C" then "p"
d."c" then "v"
QUESTION 20
What is an advantage of compiled programs over interpreted programs?
a.Complied programs don't have security vulnerabilities.
b.compiled programs
c.Compiled programs are more portable across different operating systems.
d.Compiled programs are easier to check for errors.
Explanation / Answer
Answers in bold
Q2 Normally, if you were to type "rm Thesis.txt", it would just delete it without asking. Or, if you moved a file with the same name into the same directory as your original Thesis.txt, it would overwrite it with the new version.
Which command would change the permissions for a file called Thesis.txt so that you are less likely to delete or overwrite it by accident?
chmod a+w Thesis.txt
chmod a-w Thesis.txt
chmod o-rwx Thesis.txt
chmod a+rwx Thesis.txt
QUESTION 5
Which of the following are true statements?
Unix filenames cannot contain spaces or punctuation characters
Unix filenames don't require extensions like .txt or .doc to determine the file type or purpose.
Unix filenames cannot be longer than 8 characters
Unix filenames are case sensitive, meaning that upper case a lowercase are treated differently
QUESTION 6
Which of the following commands uses sort as a filter?
ls > sort > tail
cat /etc/passwd | sort | head
sort /etc/passwd | more
ps ax | wc > sort
QUESTION 7
True or False? Unix does not have a graphical user interface, and can only be operated by entering text commands.
True
False
QUESTION 9
Which line of the following output is a symbolic link?
Line 1
Line 2
Line 3
Line 4
a.chmod a+w Thesis.txt
b.chmod a-w Thesis.txt
c.chmod o-rwx Thesis.txt
d.chmod a+rwx Thesis.txt