Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Linux Test Prep Help?

I got a practice test from my teacher, but she never gave out the answer sheet so I have no way of checking. I think I did all right (but could be completely wrong). Can someone simply verify my answers so I know where I stand?

QUESTION 1: (I answered D)

Examine the following script, n-on:

who | sort | awk '{print $1}' | uniq | wc -l

What will be the output of n-on?

A. A list of all the users currently logged on to the system and the date and time they logged on.

B. The date and time of your last login to the system.

C. The number of processes running for each user that is currently logged on to the system.

D. The number of users logged on to the system at the time the script is run.

QUESTION 2: (I answered B)

Explain the following:

1rwxrwxrwx 1 root 4 Aug 16 14:20 awk -> gawk

A. awk is a link to gawk. This means that when awk is entered at the command line, the program gawk will actually be the executable that runs.

B. gawk is a link to awk. This means that when gawk is entered at the command line, the program awk will actually be the executable that runs.

C. gawk will test and see the pattern randomly to match the awk program, if match then the action is executed.

D. gawk performes a comparison on 2 numerical strings under the awk program

QUESTION 3: (I answered D)

Which of the following creates a new directory?

A. touch Dir-A

B. dir Dir-A Dir-B

C. mkdir ~/jobs/

D. cat DIR-C > DIR-D

QUESTION 4: (I answered B)

Sandy is a member of the managers group. Consider carefully the output of ls -l. What operations can she perform on the file shown below?

-rwxr-xr-- 1 Sandy managers 4775 Aug 29 2001 tclConfig.sh

A. Read only

B. Read and execute only

C. Read, write and execute

D. Execute only

QUESTION 5: (I answered D)

The system /etc/profile has created an environment variable called LS_COLORS. You want to clear that variable because it causes display problems on your dumb terminal. What command will remove the environment variable?

A. LS_COLORS=

B. clear LS_COLORS

C. LS_COLORS=null; export LS_COLORS

D. unset LS_COLORS

QUESTION 6 (I answered B)

Decrement.sed is a sed script for reducing all numbers in a text file by one. Which command demonstrates the correct way to run this script on the text file receipt.txt?

A. ./Decrement.sed < receipt.txt

B. sed -f Decrement.sed receipt.txt

C. cat receipt.txt | Decrement.sed

D. sed -e receipt.txt < Decrement.sed

2 Answers

Relevance
  • 9 years ago
    Favorite Answer

    1-D

    2-A

    3-C

    4-B

    5-A

    6-B

  • Anonymous
    5 years ago

    Windows 7 would be, but I would say still garbage, go for console. I have neither, I use Linux, it's really fast, but not a great choice of gaming (yes you can play anygame, and if you can download the game and install it using programs {it takes like an hour longer than normal, because u need extra **** than windows} ) But yes it is the fastest OS, right now, steam came for linux :) so you can play some games like cs 1.6 cs source etc. But yet not Origin (they are also working on it, it's gonna be coming out for linux soon) What is different from linux and windows? Well in linux there is no such a thing as computer or like c: drive or drivers. Wait what? Yeah no drivers, it's hard to explain, I would recommend getting linux/ubuntu ( I use ubuntu 12.10, same as linux, but kinda different) (same company)

Still have questions? Get your answers by asking now.