Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 1 What is the difference between > and >> a.> connects the output from

ID: 3813507 • Letter: Q

Question

QUESTION 1

What is the difference between > and >>

a.> connects the output from one command to the input of another command

>> only sends the standard error from one command to another command

b.> redirects the output to a file, and creates a new file. It will overwrite the contents of the file if it already existis.

>> will append the output to a file, and won't wipe out any existing content.

> and >> are both very similar, but >> is how you automatically redirect standard output to both the sceen and a file at the same time

d.> redirects standard input

>> redirects standard output

QUESTION 2

Why should you be careful with the "rm" and other file manipulation commands in Unix?

Unix file manipulation commands run in a loop forever until stopped with the Crtl+S command.

Many traditional DOS commands are found in Unix but often have the opposite meaning.

Unix-like operating systems do not have an undelete command. Once you delete or overwrite something, it's gone. The system assumes you're smart and you know what you're doing.

Most of the old file manipulation commands from the original Unix don't have written manuals.

QUESTION 3

Which command do you type to change your password?

chown

password

chpass

passwd

QUESTION 4

Which of the following are true statements?

If you can find a place on the Internet to download a particular piece of software, it must mean that it is free.

Some software is made available without requiring that you pay any money, but the license does not allow you to modify the software or provide you with the source code that was used to create the software.

Some companies make the source code used to create to their software available, but their license says you must still pay to use the software and you are not allowed to give away copies.

You are not allowed to charge money for Linux or open source software.

QUESTION 5

You want to change the permissions on a directory named public_files so that everyone else (the "other" category of users) has the ability to go into the directory and read files, but not write to the directory.

Which command would do that for you?

chmod ugo+ public_files

chmod go=r public_files

chmod o=rx public_files

chmod 777 public_files

QUESTION 6

Unix was developed primarily using which programming language?

Fortan

C

Python

Java

QUESTION 7

There are manual pages for crontab in more than one section of the manuals. How would you display the crontab manual in section 5?

man crontab 5

help crontab 5

man 5 crontab

more crontab --section 5

QUESTION 8

What are the three basic Unix file permission mode attributes?

a .r - remove

w - write

x - examine

b.r - read

w - write

x - execute

c.l - list

d - delete

u - update

d.v - view

w - write

x - delete

QUESTION 9

On a Red Hat system, which command would you type to find a packaged named emacs in the software repository?

rpm -s emacs

find -repo emacs

apt-get search emacs

yum search emacs

QUESTION 10

What is the difference between typing “yum install emacs” and “rpm -i emacs-22.1-7.fc7-i386.rpm”

Yum installs software so any user on the system can use it, while rpm installs for the current user only.

yum will download additional dependencies, while rpm won’t do any dependency resolution.

Both do the same thing, but rpm is faster.

rpm is only used in Red Hat systems, while yum is only used in Debian systems.

QUESTION 11

You want to do a global search and replace in vi. After opening the file in vi, which command would you type to search for all occurrences of the word Apple with Orange?

:gsar:Apple:Orange

:s/Apple%Orange/

:%s/Apple/Orange/g

:[Apple][Orange]g

  

QUESTION 12

What is the purpose of the following file? /etc/profile

A listing of a server’s main hardware and software specifications.

A global configuration script that applies to all user bash shell sessions.

This file configures the wireless card.

This file configures the software repositories for downloading new software.

QUESTION 13

Why might you send the command kill -1 to the process ID number of the apache web server instead of kill -9?

Because you should start at the lowest number first, and only raise the number if the prior number doesn’t work.

Kill -9 is only a “polite” request, and often doesn’t work.

kill -1 must be used when you are the root user.

Because you web server to restart and re-read its configuration file, not shut down.

QUESTION 14

What command would you issue to shutdown a Unix machine (assuming you are root)?

sd

shutdown -h now

logout -s

killall -s

QUESTION 15

Why is it important to unmount a storage device before removing it from a running Unix system?

Because it frees up drive letters (like D:, E:) for other storage devices.

It automatically notifies all users that their open files have been saved to disk.

It will make sure that any data writes that are in temporary memory buffers will be written to disk before removal.

d.Without unmounting, the device becomes read-only when used in other computers.

QUESTION 16

In Unix, what is the purpose of the fsck command?

It is used for file compression.

It is used to find available networking sockets.

It is used as a “fast kill” command to terminate all programs owned by a user.

It is used to check and repair filesystems.

QUESTION 17

Which command can you use to test a network connection to a remote host?

fsck

ping

ls -r

echo

QUESTION 18

Both ftp and scp can be used to copy file between hosts. Why might you use scp?

ftp only copies one file at a time, while scp can copy multiple files.

ftp can only be used text files, while scp can transfer any type of file like photos or programs.

scp uses the secure shell protocol to encrypt your connection, while ftp is less secure.

scp allows anonymous downloads, while ftp only allows uploads.

QUESTION 19

Which command would search the entire filesystem for directories with 777 permissions?

find -t dirs 777

locate -type d -p 777

find / -type d -perm 777

find * -d 777

QUESTION 20

Which command would place the files homework1.txt, homework2.txt, and homework3.txt into a single compressed archive named homework-archive.tgz?

rsync homework-archive.tgz homework1.txt homework2.txt homework3.txt

tar -czf homework-archive.tgz homework1.txt homework2.txt homework3.txt

tar -xzf homework-archive.tgz homework1.txt homework2.txt homework3.txt

tar homework1.txt homework2.txt homework3.txt -czf homework-archive.tgz

a.> connects the output from one command to the input of another command

>> only sends the standard error from one command to another command

b.> redirects the output to a file, and creates a new file. It will overwrite the contents of the file if it already existis.

>> will append the output to a file, and won't wipe out any existing content.

c.

> and >> are both very similar, but >> is how you automatically redirect standard output to both the sceen and a file at the same time

d.> redirects standard input

>> redirects standard output

Explanation / Answer

1. Answer for this is (b). In both the cases the output is provided to the file whose name is mentioned after the redirection operator

2. Answer for this is (c). This command is risky and it deletes almost everything including files in hard drive. This is a very risky command.

3. Answer for this is (d).

4. (D).

5. (b)

6. (b)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote