Error messages generated by commands are sent where by default stdin stdout log files stderr

NDG Linux Essentials 2.0 Chapter 10 Exam Answers Error messages generated by commands are sent where by default? STDERR STDIN Log files STDOUT A successful command may, or may not print output to STDOUT. True or False? True False Which of the following commands will direct error messages to the file, error.log? ls /root >> […]Continue reading...

Last Updated on May 13, 2019 by

  1. Error messages generated by commands are sent where by default?

    • STDERR
    • STDIN
    • Log files
    • STDOUT
  2. A successful command may, or may not print output to STDOUT.
    True or False?

    • True
    • False
  3. Which of the following commands will direct error messages to the file, error.log?

    • ls /root >> error.log
    • ls /root > error.log
    • ls /root 2> error.log
    • ls /root $> error.log
  4. A pipe allows you to…

    • …send the same input to multiple commands.
    • …type multiple commands at one prompt.
    • …send the output of one command to another.
    • …send the output of a command to a file.
  5. Channel 2 is:

    • STDOUT
    • STDALL
    • STDERR
    • STDIN
  6. Which of the following commands will append its output to output.file?

    • echo Testing >> output.file
    • echo Testing > output.file
    • output.file < echo Testing
    • echo Testing -> output.file
  7. Which command(s) can be used to sort the lines of list.file alphabetically and display it on the screen?

    (choose two)

    • sort < list.file
    • cat list.file >> sort
    • echo list.file > sort
    • cat list.file | sort
  8. Which option of the head command will display only the first five lines of a file?

    • No option needed; head displays only five lines by default.
    • -n
    • -l 5
    • -n 5
  9. The grep command…

    • …will display all the lines that begin with the specified Regular Expression.
    • …will display all the lines in a file containing the specified Regular Expression.
    • …will display the line numbers in a file that contain a specified Regular Expression.
    • …is not case sensitive.
  10. The grep command can be used with glob characters.

    True or False?

    • True
    • False
  11. Which of the following commands will display only lines that begin with start?

    • grep start file.txt
    • grep $start file.txt
    • grep *start file.txt
    • grep ^start file.txt
  12. Which of the following commands will display only lines that begin with test?

    • grep $test* file.txt
    • grep *test file.txt
    • grep &test file.txt
    • grep ^test file.txt
  13. Which of the following commands will display lines that contain either start or end?

    • egrep ‘start|end’ file.txt
    • egrep (start|end) file.txt
    • egrep start end file.txt
    • egrep start&end file.txt
  14. Which of the following commands can be used to scroll through a text file?

    (choose two)

    • some
    • more
    • cat
    • less
  15. Which option for the cut command is used to specify a delimiter?

    • -D
    • -f
    • =
    • -d
  16. Which option for the cut command is used to specify the field?

    • -d
    • #
    • -D
    • -f
  17. Which option for the wc command will print the number of lines in a file?

    • -w
    • -l
    • -L
    • -C
  18. Which option for the wc command will print the total number of words in a file?

    • -l
    • -C
    • -L
    • -w
  19. Which command can be used to print line numbers?

    • num
    • nl
    • ln
    • sort
  20. The command echo "text" > file.txt will create file.txt if it does not already exist.

    True or False?

    • True
    • False
  21. The command echo "text" > file.txt will not overwrite file.txt if it already exists.

    True or False?

    • True
    • False
  22. The command echo "text" >> file.txt will not overwrite file.txt if it already exists.

    True or False?

    • True
    • False

28/06/2016
Linux Essentials

1. Error messages generated by commands are sent where by default?

  • Log files
  • STDOUT
  • STDERR
  • STDIN

2. A successful command will print output to STDOUT.. True or False?

  • True
  • False

3. Which of the following commands will direct error messages to the file, error.log?. (choose one)

  • ls /root >> error.log
  • ls /root 2> error.log
  • ls /root $> error.log
  • ls /root > error.log

4. A pipe allows you to…

  • …send the same input to multiple commands.
  • …type multiple commands at one prompt.
  • …send the output of one command to another.
  • …send the output of a command to a file.

5. Channel 2 is:

  • STDIN
  • STDALL
  • STDOUT
  • STDERR

6. Which of the following commands will append its output to output.file?

  • echo Testing > output.file
  • echo Testing >> output.file
  • output.file < echo Testing
  • echo Testing -> output.file

7. Which command(s) can be used to sort the lines of list.file alphabetically and display it on the screen?. (choose two)

  • sort < list.file
  • cat list.file | sort
  • cat list.file >> sort
  • echo list.file > sort

8. Which option of the head command will display only the first five lines of a file?

  • -l 5
  • No option needed; head displays only five lines by default.
  • -n
  • -n 5

9. The grep command…

  • …will display all the lines that begin with the specified Regular Expression.
  • …is not case sensitive.
  • …will display all the lines in a file containing the specified Regular Expression.
  • …will display the line numbers in a file that contain a specified Regular Expression.

10. The grep command can be used with glob characters.. True or False?

  • True
  • False

11. Which of the following commands will display only lines that begin with start?

  • grep *start file.txt
  • grep $start file.txt
  • grep start file.txt
  • grep ^start file.txt

12. Which of the following commands will display only lines that begin with test?

  • grep ^test file.txt
  • grep $test* file.txt
  • grep *test file.txt
  • grep &test file.txt

13. Which of the following commands will display lines that contain either start or end?

  • egrep start end file.txt
  • egrep ‘start|end’ file.txt
  • egrep start&end file.txt
  • egrep (start|end) file.txt

14. Which of the following commands can be used to scroll through a text file?. (choose two)

  • some
  • less
  • cat
  • more

15. The find command can search for files based on the size of the file.. True or False?

  • True
  • False

16. Which of the following commands scans the file to determine file locations?

  • search
  • locate
  • where
  • find

17. Which option for the cut command is used to specify a delimiter?

  • -f
  • -d
  • =
  • -D

18. Which option for the cut command is used to specify the field?

  • -D
  • -f
  • -d
  • #

19. Which option for the wc command will print the number of lines in a file?

  • -l
  • -w
  • -C
  • -L

20. Which option for the wc command will print the total number of words in a file?

  • -l
  • -L
  • -C
  • -w

21. Which command can be used to print line numbers?

  • num
  • sort
  • ln
  • nl

22. The command echo “text” > file.txt will create file.txt if it does not already exist.. True or False?

  • True
  • False

23. The command echo “text” > file.txt will not overwrite file.txt if it already exists.. True or False?

  • True
  • False

24. The command echo “text” >> file.txt will not overwrite file.txt if it already exists.. True or False?

  • True
  • False

Last Updated on April 29, 2018 by

  1. Question ID 93

    Error messages generated by commands are sent where by default?

    • Log files
    • STDOUT
    • STDERR
    • STDIN
  2. Question ID 94

    A successful command will print output to STDOUT.

    True or False?

    • True
    • False
  3. Question ID 95

    Which of the following commands will direct error messages to the file, error.log?

    (choose one)

    • ls /root >> error.log
    • ls /root 2> error.log
    • ls /root $> error.log
    • ls /root > error.log
  4. Question ID 96

    A pipe allows you to…

    • …send the same input to multiple commands.
    • …type multiple commands at one prompt.
    • …send the output of one command to another.
    • …send the output of a command to a file.
  5. Question ID 97

    Channel 2 is:

    • STDIN
    • STDALL
    • STDOUT
    • STDERR
  6. Question ID 98

    Which of the following commands will append its output to output.file?

    • echo Testing > output.file
    • echo Testing >> output.file
    • output.file < echo Testing
    • echo Testing -> output.file
  7. Question ID 99

    Which command(s) can be used to sort the lines of list.file alphabetically and display it on the screen?

    (choose two)

    • sort < list.file
    • cat list.file | sort
    • cat list.file >> sort
    • echo list.file > sort
  8. Question ID 100

    Which option of the head command will display only the first five lines of a file?

    • -l 5
    • No option needed; head displays only five lines by default.
    • -n
    • -n 5
  9. Question ID 101

    The grep command…

    • …will display all the lines that begin with the specified Regular Expression.
    • …is not case sensitive.
    • …will display all the lines in a file containing the specified Regular Expression.
    • …will display the line numbers in a file that contain a specified Regular Expression.
  10. Question ID 102

    The grep command can be used with glob characters.

    True or False?

    • True
    • False
  11. Question ID 103

    Which of the following commands will display only lines that begin with start?

    • grep *start file.txt
    • grep $start file.txt
    • grep start file.txt
    • grep ^start file.txt
  12. Question ID 104

    Which of the following commands will display only lines that begin with test?

    • grep ^test file.txt
    • grep $test* file.txt
    • grep *test file.txt
    • grep &test file.txt
  13. Question ID 105

    Which of the following commands will display lines that contain either start or end?

    • egrep start end file.txt
    • egrep ‘start|end’ file.txt
    • egrep start&end file.txt
    • egrep (start|end) file.txt
  14. Question ID 106

    Which of the following commands can be used to scroll through a text file?

    (choose two)

    • some
    • less
    • cat
    • more
  15. Question ID 107

    The find command can search for files based on the size of the file.

    True or False?

    • True
    • False
  16. Question ID 108

    Which of the following commands scans the file to determine file locations?

    • search
    • locate
    • where
    • find
  17. Question ID 109

    Which option for the cut command is used to specify a delimiter?

    • -f
    • -d
    • =
    • -D
  18. Question ID 110

    Which option for the cut command is used to specify the field?

    • -D
    • -f
    • -d
    • #
  19. Question ID 111

    Which option for the wc command will print the number of lines in a file?

    • -l
    • -w
    • -C
    • -L
  20. Question ID 112

    Which option for the wc command will print the total number of words in a file?

    • -l
    • -L
    • -C
    • -w
  21. Question ID 113

    Which command can be used to print line numbers?

    • num
    • sort
    • ln
    • nl
  22. Question ID 114

    The command echo “text” > file.txt will create file.txt if it does not already exist.

    True or False?

    • True
    • False
  23. Question ID 115

    The command echo “text” > file.txt will not overwrite file.txt if it already exists.

    True or False?

    • True
    • False
  24. Question ID 116

    The command echo “text” >> file.txt will not overwrite file.txt if it already exists.

    True or False?

    • True
    • False
  1. Error messages generated by commands are sent where by default?

    • STDERR
    • STDIN
    • Log files
    • STDOUT
  2. A successful command may, or may not print output to STDOUT.
    True or False?

    • True
    • False
  3. Which of the following commands will direct error messages to the file, error.log?

    • ls /root >> error.log
    • ls /root > error.log
    • ls /root 2> error.log
    • ls /root $> error.log
  4. A pipe allows you to…

    • …send the same input to multiple commands.
    • …type multiple commands at one prompt.
    • …send the output of one command to another.
    • …send the output of a command to a file.
  5. Channel 2 is:

    • STDOUT
    • STDALL
    • STDERR
    • STDIN
  6. Which of the following commands will append its output to output.file?

    • echo Testing >> output.file
    • echo Testing > output.file
    • output.file < echo Testing
    • echo Testing -> output.file
  7. Which command(s) can be used to sort the lines of list.file alphabetically and display it on the screen?

    (choose two)

    • sort < list.file
    • cat list.file >> sort
    • echo list.file > sort
    • cat list.file | sort
  8. Which option of the head command will display only the first five lines of a file?

    • No option needed; head displays only five lines by default.
    • -n
    • -l 5
    • -n 5
  9. The grep command…

    • …will display all the lines that begin with the specified Regular Expression.
    • …will display all the lines in a file containing the specified Regular Expression.
    • …will display the line numbers in a file that contain a specified Regular Expression.
    • …is not case sensitive.
  10. The grep command can be used with glob characters.

    True or False?

    • True
    • False
  11. Which of the following commands will display only lines that begin with start?

    • grep start file.txt
    • grep $start file.txt
    • grep *start file.txt
    • grep ^start file.txt
  12. Which of the following commands will display only lines that begin with test?

    • grep $test* file.txt
    • grep *test file.txt
    • grep &test file.txt
    • grep ^test file.txt
  13. Which of the following commands will display lines that contain either start or end?

    • egrep ‘start|end’ file.txt
    • egrep (start|end) file.txt
    • egrep start end file.txt
    • egrep start&end file.txt
  14. Which of the following commands can be used to scroll through a text file?

    (choose two)

    • some
    • more
    • cat
    • less
  15. Which option for the cut command is used to specify a delimiter?

    • -D
    • -f
    • =
    • -d
  16. Which option for the cut command is used to specify the field?

    • -d
    • #
    • -D
    • -f
  17. Which option for the wc command will print the number of lines in a file?

    • -w
    • -l
    • -L
    • -C
  18. Which option for the wc command will print the total number of words in a file?

    • -l
    • -C
    • -L
    • -w
  19. Which command can be used to print line numbers?

    • num
    • nl
    • ln
    • sort
  20. The command echo "text" > file.txt will create file.txt if it does not already exist.

    True or False?

    • True
    • False
  21. The command echo "text" > file.txt will not overwrite file.txt if it already exists.

    True or False?

    • True
    • False
  22. The command echo "text" >> file.txt will not overwrite file.txt if it already exists.

    True or False?

    • True
    • False

REALIZAR TEST

Título del test:
linux cap 1-16

Descripción:
examen final

Autor:
AVATAR

Fecha de Creación:
07/06/2017

Categoría:
Otros

Número preguntas: 64

No hay ningún comentario sobre este test.

Temario:

One of the jobs of the kernel is to Manage the system’s resources Turn source code into machine code Load the operating system after the computer is turned on Transfer mail from one machine to another.
Unix is:
(choose two) An operating system A trademark A distribution of Linux A text editor A type of hardware.
Linux is written in: C NET C++ Java Perl.
Source code refers to: The version of a program that the computer runs on the CPU The license that dictates how you may use and share the software The interface that software uses to talk to the kernel A human readable version of computer software.
What is the standard option to provide a command line program to view its documentation? –info –doc –help -h.
The command man -k is the same as the command apropos.
True or False? True False.
The whatis command is the same as man -w. True False.
The directory where additional documentation for software packages most likely can be found is: /var/lib/doc /usr/software/doc /usr/share/doc /var/share/doc.
Hidden files are files that begin with what character? A plus (+) A dash (-) A period (.) An asterisk (*).
What option for the ls command will display all files, including hidden files? -w -H -L -a.
The top-level directory on a Linux system is represented as: / /root /home C:.
Is the following path absolute or relative?
/etc/ppp Relative Absolute.
Is the following path absolute or relative?
sysadmin/Documents Relative Absolute.
Compression on a file works by: Removing the high order bit from each byte Removing redundant information Storing most of the data on removable media and just leaving a pointer Eliminating gaps within the file Consolidating multiple files into one.
In general, for which of the following would you want to use lossless compression? An mp3 audio file An encrypted email A JPEG image A log file A movie.
Lossy compression:
(choose three) Is often used with documents Sacrifices some quality Usually results better compression than lossless Is often used with images Decompresses to an identical version as the original.
You type gzip myfile.tar. What happens?
(choose two) myfile.tar.gz holds a compressed version of myfile.tar An error; you forgot to pass the name of the output file An error; you forgot to specify the file with –f myfile.tar is unarchived into the current directory myfile.tar is removed.
Error messages generated by commands are sent where by default? STDIN Log files STDERR STDOUT.
A successful command will print output to STDOUT.
True or False? True False.
Which of the following commands will direct error messages to the file, error.log?
(choose one) ls /root > error.log ls /root $> error.log ls /root >> error.log ls /root 2> error.log.
A pipe allows you to… …send the same input to multiple commands. …send the output of one command to another. …send the output of a command to a file. …type multiple commands at one prompt.
Channel 2 is: STDERR STDIN STDALL STDOUT.
The echo command: Tests a variable for duplication Is used for variable assignment Is used to output text to the console Copies variables from one to another Duplicates the input stream to the output stream.
A file begins with #!/bin/csh. This means: C Shell compatibility mode is enabled Running the script will invoke /bin/csh to interpret the rest of the file The operator should not be using /bin/csh This is a Perl script Nothing, this is a comment.
Which are appropriate editors for writing shell scripts?
(choose two) nano /bin/bash vi Firefox LibreOffice Writer.
Most of nano’s commands take the form of: Escape followed by another character Mouse clicks The F1 through F12 function keys Alt and another character Control and another character.
What does this shell script do?
FOO=/tmp/foo
if [ ! –d $FOO ]; then
mkdir $FOO
fi Nothing, since there is a problem with the conditions in the if statement
Creates /tmp/foo if it does not exist Creates /tmp/foo and raises an error if there is a problem Outputs a message to the screen Makes the /tmp/foo directory if a file by that name exists.
Which of the following are valid CPU types for Intel-based platforms?
(choose two) 48 bit 24 bit 64 bit 32 bit.
64 bit platforms can access more memory than 32 bit platforms.
True or False? True False.
What does the acronym RPM mean? Relocate Package Manager Return Package Management RPM Package Management Recursive Package Manager.
One way to install new software on a Linux system is to use a package management system.
True or False? true false.
When you execute the dmesg command, the system displays messages that are generated by the kernel.
True or False? true false.
Which of the following are package management commands for distributions with software distributed in files ending in .deb?
(choose three) rpm apt-get dpkg aptitude.
Which of the following are package management commands for distributions with software distributed in files ending in .rpm?
(choose three) yum apt-get rpm yumex.
Which of the following would be considered a host? A printer attached to the network via an IP address A CDROM The computer’s hard drive A network cable.
A service is… …a file that contains configuration information. …another name for a computer’s hostname. …a feature provided by one computer to another. …like an IP address.
A network packet contains …
(choose two) …the IP address of the destination machine. …the IP address of the source machine. …the name of the router. …a hard drive partition.
Only servers have hostnames.
True or False? true false.
Which files contain user account information?
(choose two) /etc/passwd /etc/group /etc/shadow.
Which user can view the /etc/shadow file? the root user No users Any member of the password group All users.
Which command will display the UID, GID and groups your current user belongs to? whoami id who about.
Each user belongs to at least one group. true false.
Which command will display the users that are currently logged in to the system? who about id whoami.
UIDs 1-500 are usually reserved for what kind of users? Are not used for user accounts, but for group accounts System accounts, such as server processes Remote log-in accounts Log-in (human) users.
If a user is deleted, the files and directories that the user owned… …are deleted as well. …will have no UID owner. …will show a UID as the owner, but not user name. …will have no user owner.
Which of the following options for the useradd command allows root to specify the UID to be associated with the account? -g -u -U -G.
Which of the following options for the useradd command allows root to specify supplementary groups the user will be a member of? -u -G -g U.
On a system that does not use UPG, the useradd command will also create a user group. For example, user bob, group bob.
True or False? true false.
Which of the following commands set “other” permissions on file to r-x? chmod o+rx file chmod o-r-w file chmod o=r+x file chmod o=rx file.
Which of the following commands sets “other” permissions on file to r-x? chmod 774 file chmod 776 file chmod 775 file chmod 777 file.
Only one set (user, group, other) of permission can be changed at once using the symbolic method.
True or False? true false.
Which of the following are methods for setting permissions using the chmod command?
(choose two) letter octal symbolic binary.
The chown command can be used to change the owner and group of a file.
True or False? true false.
The Samba application is a: Mail Server Security Server File Server Web Server.
Which of the following are examples of desktop software?
(choose two) Web server Web browser File share Compiler Music player.
If you wanted to set up a blog, which software would be most helpful? MySQL Postfix WordPress Dovecot Samba.
Which of the following pieces of software deal with file sharing?
(choose three) NFS PostgreSQL X-Windows Netatalk Samba.
If you wanted to create and print an invoice, which software could you use? GNOME Evolution Firefox LibreOffice Compiz.
Which of the following is true about graphical mode?
(choose three) You have menus and tools to help you find what you are looking for You access this mode by logging into a graphical display After login, you are provided with a command prompt After login, you are provided with a desktop You cannot use your mouse.
Which of the following is provided by a graphical interface that isn’t normally provided to a non graphical interface?
(choose four) Desktop

Menus Popups Windows Shell.
A server is likely to be running in graphical mode.
True or False? true false.
In graphical mode, you can get to a shell by running which applications?
(choose two) guiterm gbash terminal xconsole xterm.
Which of the following are traits of a multiuser operating system?
(choose three) An administrative user gets a dedicated CPU Each user can only log in once per day Many users can log in simultaneously with a unique account Resources are shared between users Users can protect their information from other users.
Given the following script:
while [ ! –f /tmp/foo ]; do
echo –n “.”
process_data > /tmp/foo
done
Which of the following are true?
(choose two) The screen will fill with dots. /tmp/foo will be removed if it exists process_data will never be run If a file called /tmp/foo exists, process_data won’t be run process_data will be called at most once.

Total word count:
373

Pages:
1

Error messages generated by commands are sent where by default?

STDERR

A successful command will print out put to STDOUT

True

Which of the following commands will direct error messages to the file, error.log?

✔ ls /root 2&gt; error.log

A pipe allows you to

send the output of one command to another

Channel 2 is

STDERR

Which of the following commands will append its output to output.file?

echo Testing >> output.file

Which command(s) can be used to sort the lines of list.file alphabetically and display it on the screen?

sort < list.file cat list.file | sort

Which option of the head command will display only the first five lines of a file

-n 5

The grep command

will display all the lines in a file containing the specified Regular Expression

The grep command can be used with glob characters

TRue

which of the following commands will display only lines that begin with start?

Grep ^start file. txt

which of the following commands will display only lines that begin with test

grep ^test file.txt

which of the following command will display lines that contain either start or end

egrep ‘start|end’file.txt

which of the following commands can be used to scroll through a text file

less more

the find command can search for files based on the size of the file

true

which of the following commands scans the file to determine file location

find

which option for the cut command is used to specify a delimiter

-d

which option for the cut command is used to specify the field

-f

which option for wc command will print the number of lines in a file

-l

which option for the wc command will print the total number of words in a file

-w

which command can be used to print line numbers

nl

the command echo «text» &gt; file.txt will create file.txt if it does not already exist.

true

the command echo «text» &gt; file.txt will not overwrite file.txt if it already exists.

false

the command echo «text» &gt;&gt; file.txt will not overwrite file.text if it already exists

true

Unfinished tasks keep piling up?

Let us complete them for you. Quickly and professionally.

Check Price


С этим файлом связано 1 файл(ов). Среди них: срс-1 адилет.pptx.
Показать все связанные файлы


Подборка по базе: Текстовый документ OpenDocument.odt, Energy and its sources_1.pdf, Текстовый документ OpenDocument.odt, Текстовый документ OpenDocument.odt, Текстовый документ OpenDocument.odt, Текстовый документ OpenDocument (4) 1123.odt, Текстовый документ OpenDocument.odt, Текстовый документ OpenDocument.odt, Текстовый документ OpenDocument (2).odt, Текстовый документ OpenDocument.odt


Users and Groups

1.Question 1

Basic information about the characteristics of a user’s account can be found in:

  • /etc/passwd

2.Question 2

Adding a new user to a group is done with:

  • usermod

3.Question 3

Which provides stronger security and auditing for system activity:

  • sudo

4.Question 4

Differences between su and su — include (Select all answers that apply):

  • su preserves more information, such as current directory, path and environment variables
  • su — starts a new login shell, while su just continues the current shell, but gives it super privileges

5.Question 5

Which is the proper way to use sudo with echo?

  • sudo bash -c «echo 3 > /proc/sys/vm/drop_caches»

Linux base from test samples and test samples 2

  1. A command that will continuously update statistics about running processes:

a. bottom
b. tall
c. top
d. head

2. A computer running Linux can:
a. Function as a web server
b. Outperform proprietary systems at certain tasks
c. Serve a government agency
d. All of the above
e. Be used to create new programs

3. A conditional that lets you make multiple comparisons with is called:
a. fanout
b. test
c. case.
d. branch
e. if

4. A division of a hard drive may be referred to as a __.
a. partition
b. block
c. label
d. portion

5. A file begins with _#!/BIN/CSH __._ This means.
a. This is a Perl script
b. Running the script will invoke /bin/csh to interpret the rest on the file
c. C Shell compatibility mode is enabled
d. The operator should not be using /bin/csh
e. Nothing, this is a comment

6. A long software release cycle is:
a. Only offered by Red Hat and SUSE
b. Better because old hardware can be utilized is service file
c. Makes programming more difficult since new feature cannont be used
d. Valued by businesses that want stability
e. Characterized by infrequent security fixes

7. A Mail Transfer Agent’s primary purpose is to:
a. Manage the end user’s inbox
b. Serve email to end clients
c. Deliver mail between servers
d. Act as a gateway between faxes and email
e. Filter out spam

8. A maintenance cycle:
a. Should be long so that you have time before you need to upgrade
b. Only has meaning for paid software
c. Describes how long a version of software will be supported
d. Describes how often updates for software come out
e. Should be short so you always have freshest releases

9. A pipe allows you to…
a. … type multiple commands at one prompt.
b. … send the output of one command to another.
c. … send the output of a command to a file.
d. … send the same input to multiple commands.

10. A service is…
a. … another name for a computer’s hostname.
b. … like in IP address.
c. … a feature provided by one computer to another.
d. … a file that contains configuration information.

11. A software release cycle describes:
a. How often the computer must be rebooted
b. How often the computer must be upgraded to support new software
c. How often security fixes are implemented
d. How often the software’s memory is released back to the operating system
e. How often upgrades come out for software

12. A special program that gathers all of the source code files and generates instructions that can be run on the computer
a. Application
b. Software
c. Compiler
d. Source code

13. A user can belong to…
a. At least 16 groups
b. Only five groups
c. Only groups with a GID over 500
d. Only one group

14. Brackets cannont be used to a represent a range of a characters
a. False.
b. True

15. Bundling utilities, management tools, and application software with a Linux kernel is called a:
a. A trademark
b. A text editor
c. A type of hardware
d. A distribution of Linux

16. By default, the zip command replaces uncompressed files with compressed files
a. True
b. False

17. Channel 2 is
a. STDIN
b. STDALLL
c. STDERR
d. STDOUT

18. Cloud computing is:
a. Allows users in different geographical region to work together in real time
b. All the correct
c. Requires fewer resources because systems are shared among many users
d. Is useful for both business and home users
e. Is made possible by faster internet speeds

19. Compression of a file works be:
a. Eliminating gaps within the file
b. Removing redundant information
c. Consolidating multiple files into one
d. Removing the high order bit from each byte

20. Embedded Systems means:
a. You can view the software’s source code
b. Business cannot charge anything for the software, only the hardware
c. Users must support the systems themselves
d. Companies must share their changes
e. Systems designed to do a specific task on hardware optimized for only one purpose

21. Which log file messages regarding authentication and authorization?
a. secure
b. syslog
c. dmesg
d. messages

22. Which of the following are common busing systems?
a. USB
b. BIOS
c. RAM
d. CPU

23. Which of the following are true about compiled programming languages?
a. Ruby is a compiled language
b. A programming is usually more productive then using language
c. Perl is a compiled language
d. C is a compiled language
e. Compiled languages are great for system administration tasks like scripting

24. Which of the following are valid CPU types for Intel-based platforms? (
a. 48-bit
b. 52-bit
c. 24-bit
d. 32-bit

25. Which of the following are valid video cable connector types?
a. AMD
b. HDA
c. VGA
d. RAM

26. Which of the following commands can be used to compress a file?
a. cat
b. pwd
c. bunzip2
d. gzip

27. Which of the following commands can be used to display socket statistics, and supports all major packet and socket types?
a. ifconfig
b. route
c. ss
d. top

28. Which of the following commands ca be used to modify a group?
a. modgroup
b. groupadd
c. addgroup
d. groupmod

29. Which of the following commands can be used to rename a file?
a. rm
b. name
c. mv
d. cp

30. Which of the following commands set “other” permissions on file to r-x?
a. chmod o-r-w file
b. chmod o=r+x file
c. chmod 0+rx file
d. chmod o=rx file

31. Which of the following commands sets “other” permissions on file to r-x?
a. chmode 775 file
b. chmode 776 file
c. chmode 777 file
d. chmod 774 file

32. Which of the following commands will add the group extra to the user bob’s secondary groups in addition to bob’s current secondary groups?
a. usermode -ag bob extra
b. usermode -a extra bob
c. usermode -G extra bob
d. usermode -aG extra bob

33. Which of the following commands will allow you to into a remote machine?
a. netsat
b. ssh
c. route
d. dig

34. Which of the following commands will allow you to log into the machine server1 with the account name nick?
a. ssh nick->server1
b. ssh nick&server1
c. ssh nick@server1
d. ssh nick-server1

35. Which of the following commands will append its output to _OUTPUT.FILE_?
a. output.file &It; echo Testing
b. echo Testing -> output.file
c. echo Testing > output.file
d. echo Testing >> output.file

36. Which of the following commands will create a zipfile with the content of your Documents directory?
a. zip -c mydocs.zip Documents
b. zip -cf mydocs.zip Documents
c. zip -r mydocs.zip Documents
d. zip -f mydocs.zip Documents

37. Which of the following commands will direct error messages to the file, _ERROR.LOG_?
a. Is /root>> error.log
b. Is /root > error.log
c. Is /root $> error.log
d. Is /root 2> error.log

38. Which of the following commands will display CPU information?
a. Ispic
b. cpuinfo
c. showcpu
d. arch

39. Which of the following commands will display lines that contain either start or end?
a. egrep start end file.txt
b. egrep (start|end) file.txt
c. egrep start&end file.txt
d. egrep ‘start|end’ file.txt

40. Which of the following commands will display only lines that begin with _START_?
a. grep ^start file.txt
b. grep start file.txt
c. grep $start file.txt
d. grep *start file.txt
41. Error messages generate by commands are sent where by default?
a. STDOUT
b. Log files
c. STDIN
d. STDERR

42. Error messages generate by commands are sent where by default?
a. STDOUT
b. Log files
c. STDIN
d. STDERR

43. Give a file called documents.zip, how can you see what’s in it without extracting the files?
a. zip -If documents.zip
b. unzip — — list documents.zip
c. unzip -l documents.zip
d. showzip documents.zip.

44. Given the following part a script: [What is the meaning of $1?] What is the meaning of $1?
a. It is a list of files that gets interpolated
b. It is the first argument passed to the script
c. It is a parameter to -f, indicating the size of the file
d. It is a special variable that indicates the exit code of the command before it
e. It is a file called $1

45. Given the following part a script: [What is the meaning of $1?] What is the meaning of $1?
a. It is a list of files that gets interpolated
b. It is the first argument passed to the script
c. It is a parameter to -f, indicating the size of the file
d. It is a special variable that indicates the exit code of the command before it
e. It is a file called $1

46. Given the following script that is run thought _./TEST.SH HELLO GOODBYE_:[When will “I am here” be printed?] When will “I am here” be printed?
a. The script will always print “I am here”
b. Never
c. If there are two in the current directory
d. If a file called “hello” exists in the current directory
e. If a file called “goodbye” exists un the current directory

47. How called the command which display manual page?
a. less
b. vim
c. ls
d. nano
e. more

48. How looks structure of using the — -help option to a command?
a. — -help[command]
b. [command] — -man
c. [command] help
d. [command] -help
e. [command] — -help

49. How to change up one level from the current directory and the down into the other directory?
a. cd ../[otherdirectory]
b. cp ../[otherdirectory]
c. mv.. ../[otherdirectory]
d. ../[otherdirectory]
e. cd../…/

50. How to display a man page for a different section?
a. crontab
b. man -v
c. man [number of section] [command]
d. man[command]
e. — — help

51. How to display today’s date?
a. date
b. $HOME
c. man
d. $HISTSIZE
e. info

52. How to search for “newer” files?
a. updatedb
b. search
c. using
d. — -find
e. find

53. How to see a list of movement commands?
a. Type the letter z or Z
b. Type the letter a or g
c. Type the letter m or M
d. Type the letter q or n
e. Type the letter h or H

54. How to see not only the contents of a directory, but also the contents of the subdirectories.
a. ls -R[path]
b. ls -tH[path]
c. ls -l[path]
d. ls -r[path]
e. ls -h[path]

55. How would you finish your script an exit code of 42?
a. return 42
b. $?=42
c. exit 42
d. CODE =42
e. break 42

56. How would you write a test that says “if /tmp/foo is directory or USERS is greater than 5”
a. test -d /tmp/foo -o $USERS -gt 5
b. test /tmp/foo -d -o $USERS -gt 5
c. test -d /tmp/foo | $USERS > 5
d. test /tmp/foo || $USERS > 5

57. If a user is deleted, the files and directories that the user owned… (became orphaned files)
a. … will show a UID as the owner, but not user name
b. … will have no user owner
c. … are deleted as well
d. … will have no UID owner

58. If you wanted to let a Linux machine share files Windows clients and servers? You would use:
a. DNS
b. NFS
c. bind
d. Samba
e. Netatalk

59. In general for which of the following you want to use lossless compression?
a. A JPEG image
b. An mp3 audio file
c. An encrypted email (?)
d. Log file

60. In Linux, RPM can be defined as:
a. Radical performance machine
b. The speed a record plays back at
c. Relational peak monitoring
d. The Package Manager program for Red Hat Linux
e. Random program memory

61. In the command tar =cvjf foo.tbz a b c, what are a, b, and c?
a. Is the directory will be prepended to files; b and c are files inside it
b. Matching operators; anything starting with a, b, or c will be added
c. Nothing; cvjf only expects one parameter
d. File names to be added to the archive

62. Information about the init process can be found in the /proc/1 directory.
a. True
b. False

63. Linux distributive use this to add and remove software from the system:
a. Application Programming Interface (API)
b. Package manager
c. Bash
d. Compiler
e. Partitioning tool

64. Many open source licenses such as BSD and MIT do not contain the copyleft provisions and are thus not acceptable to the FSF (Free Software Foundation). These licenses are called ___ free software licenses.
a. Lax
b. Agreeable
c. Permissive
d. Indulgent

65. Most of NANO’s commands take the form of:
a. Escape followed by another character
b. Mouse clicks
c. Control and another character
d. The F1 though F12 function keys
e. Alt and another character

66. Octal notation uses the following values for the permissions granted:
a. r=7, w=5, x=0
b. r=4, w=2, x=0
c. r=4, w=2, x=1
d. r=3, w=2, x=1

67. POP and IMAP are related to:
a. Reading and writing music
b. Letting users log in to multiple with 1 set of credentials
c. Serving web pages
d. Sharing files
e. Email

68. Setting setgid on a directory…
a. … will allow scripts in the directory to be executed as the group owner of the directory
b. … will set the group owner of all files created in the directory to the group owner of the directory
c. … does nothing
d. … is not allowed by the system

69. Software is backward compatible if:
a. People still use old versions
b. If the next version still works the same way
c. It will supports old file doormats or applications
d. Is can be upgraded without downtime
e. It works across Linux/Mac/Windows

70. Software that allows hardware devices to communicate with the installed operating system is called?
a. Instructions
b. Drivers
c. Package Packages
d. Programs

71. Structure of calling info pages
a. I [command]
b. info [command]
c. calinfo [command]
d. -info [command]
e. help [command]

72. The _GREP_ command…
a. … will display the line numbers in a file that contain a specific Regular Expression
b. … is not case sensitive
c. … will display all the lines in a file containing the specified Regular Expression
d. … will display all the lines that begin with the specified Regular Expression

73. The _IF_ command looks for that exit code to consider a condition to be true?
a. 255
b. 1
c. 0
d. 2
e. 10

74. The “execute” permission on a file allows you to:
a. Move the file to a new directory
b. Run the file as a script
c. This permission isn’t meaningful for text files
d. Delete the file

75. The “setuid” permission…
a. … allows a command to be run as the file owner
b. … report the output of a script to the owner
c. … prevents the owner of a file from being changed
d. … allows files is a directory to be manipulated as by the directory owner

76. The “sticky bit” permission…
a. … prevents others from removing files they don’t own from a common directory
b. … sets the group ownership of any new file created in a directory
c. … prevents others from overwriting files they don’t own in common directories
d. … changes the group ownership of existing files in a directory

77. The /etc/group file what structure?
a. group_name:password_placehoder:GID:user_list
b. user:group
c. group:GID:user_list
d. groups -a

78. The /proc directory contains a subdirectory for each process present on the system
a. TRUE
b. FALSE

79. The asterisk character is used to represent zero or mode of any character in a filename.
a. True
b. False

80. The chgrp command can be used on a file by:
a. Only the file owner
b. A user belongs to the files current group
c. Only root
d. The file owner and root
81. The chmod command can be used on a file by:
a. A user that belongs to the current group
b. The file owner
c. Only root
d. The file owner and a root

82. The chow command can be used to change the user owner on a file by:
a. The file owner and root
b. Only root
c. A user that belongs to the files current
d. The file owner

83. The command rm -r will…
a. generate an error; -r isn’t a valid option
b. remove only empty directories
c. prompt for each confirmation before deleting each file in a directory
d. remove a directory along with any files or subdirectories

84. To correct command structure for getting manual page looks like:
a. man [command]
b. manual [command]
c. sos [command]
d. help [command]
e. date [command]

85. The fdisk command is a tool used for working with the MBR partitioned disks.
a. True
b. False

86. The free command outputs statistics about:
a. CPU usage
b. Software usage
c. Memory usage
d. Disk usage

87. The Linux platform that runs on mobile phones is called:
a. IOS
b. LinuxMobile
c. MicroLinux
d. Teledroid
e. Android

88. The logging daemon on recent Linux distributions on system is called:
a. knogd
b. rsyslogd
c. syslogd
d. journald

89. The main purpose of using glob characters to be able to provide a list of filenames to a command.
a. False
b. True

90. The most important consideration when choosing an operating system is:
a. What the intended use of the systems is
b. Whether or not is cloud-friendly
c. How much performance is needed
d. The licensing model of the operating system
e. The total cost of ownership

91. The most popular Linux platform for mobile phones is:
a. Android
b. BlackBerry
c. MobileLinux
d. IOS
e. Slackware

92. The numbers of users logged in is a variable called USERS. How would you test to see if 5 users are logged in?
a. test $USERS = 5
b. test – f USERS = 5
c. test $USERS, 5
d. test $USERS -a 5
e. test $USERS -eq 5

93. The process (ps) command shows only processes running in the current shell by default.
a. TRUE
b. FALSE

94. The Process ID (PID) of the init process is:
a. 100
b. 1
c. 0
d. 101

95. The release cycle:
a. Should be long so that you have time before you need to upgrade
b. Describes how long software will be supported
c. Should be shot so you always have the freshest releases
d. Only has meaning for paid software
e. Dictates how often software is update

96. The rm command can delete multiple files at once.
a. False
b. True

97. The Samba application is a:
a. File Server
b. Mail Server
c. Security Server
d. Web Server

98. The sudo command allows regular uses to…
a. … execute any command as root, after providing the root password.
b. … run any command as root, after providing the sudo password.
c. … execute commands as another user.
d. … run any commands as a system account without logging in.

99. The term for individual computers running multiple systems at the same time it:
a. Distribution
b. Cloud priority
c. Virtualization
d. MultiRun
e. Googleization

100. To find files with a specific name, use the following command:
a. locate “[filenane]”
b. location “[filenane]”
c. location -b [filenane]
d. location -b “[filenane]”
e. locate -b “[filenane]”

101. Traditional UNIX systems allowed users to belong to how many groups?
a. 256
b. 10.000
c. 1
d. 16
e. 65.000

102. UID-s 1-499 are usually for what kind of users?
a. System accounts, such as server processes
b. Remote log-in accounts
c. Are not used accounts, but for group accounts
d. Log-in (human) users

103. Virtualization means:
a. Two users get different memory spaces on the same machine
b. A single host can be split up into multiple guests
c. A machine can swap memory to disk
d. A user can connect to a server over the network and use a virtual console
e. Many users can share one hard drive

104. What are the advantages of solid state disks when compared to traditional spinning platter hard disks?
a. Low cost
b. Less heat
c. Faster system boot times.
d. Higher capacity

105. What command we can use to change your current directory?
a. touch
b. ls
c. mv
d. cp
e. cd

106. What difference between commands info and man?
a. info to change directories, and man to additional help
b. no differences
c. info often written more like “lessons” while man pages are written as documentation
d. info to get a list of directories, and man to search
e. they are the same

107. What directory contains a user’s home directory?
a. /user
b. /home
c. /
d. /roots

108. What directory typically contains log files?
a. /var/log
b. /usr/log
c. /proc/log
d. /log

109. What does a distribution provide to add and remove software from the system?
a. Package Manger
b. Application Programming Interface (API)
c. Compiler
d. Bash
e. Partitioning tool

110. What does this shell script do? [What does this shell script do?] (видимо здесь должно быть это, ибо это единственное совпадение в вопросах в интернета, но в самой базе текста ниже нет)

FOO =/tmp/foo
if [ ! -d$FOO ]; then
mkdir $FOO
fi
a. Nothing, since there is a problem with the conditions in the if statement
b. Makes the /tmp/foo directory a file by that name exists
c. Outputs a massage to the screen
d. Creates /tmp/foo if it does not exist
e. Creates /tmp/foo and raisers an error if there is a problem

111. What information is held inside _$?_?
a. The number of arguments passed to the script
b. The current process id
c. The previous command’s exit code
d. The name of the command run
e. The current user ID

112. What is a home directory?
a. all of the above
b. directory for displaying desktop files
c. folder for trash
d. root directory
e. the directory that your terminal windows is currently “in”

113. What is a relative pathname?
a. with relative paths, you display a list of commands available to execute
b. with relative pathnames you provide “directions” of where you want to go from the current directory
c. with relative paths, you get information about the current directory
d. none of the above
e. with relative path, you specify the files you want to display

114. What is an inode?
a. There is no such word
b. sophisticated big data search algorithm
c. specialized program for accounting names, identifiers and other data
d. unique identifier number assigned to each file
e. text viewer

115. What is the absolute path?
a. path to home directory
b. directory where located other directories
c. path for arguments and commands
d. complete paths from the root directory to a subdirectory or file
e. none of the above

116. What is the correct way to assign the world “Hello” to a variable? (there shouldn’t be spaces around =)
a. echo “Hello” $amp;gtA
b. A = “Hello”
c. echo $A “Hello”
d. A=“Hello”
e. $A= “Hello”

117. What is the correct way to assign the world “Hello” to a variable?
a. echo $A “Hello”
b. A = Hello
c. A = “Hello”
d. $A = “Hello”
e. echo “Hello” $amp;gtA

118. What is the correct way to save the current directory to a variable?
a. pwd | $A
b. pwd $A
c. A=pwd
d. A= ‘pwd’
e. A=cwd

119. What is the default user for the su command?
a. All users
b. The most recently created user
c. The root user
d. Any member of the password group

120. What is the meaning of _$(($l+1))_?
a. 1 will be added to the I variable
b. This runs the command stored in variable i
c. This will return the value of the first argument to the script
d. If I if 0. The loop will stop
e. This will return the value of the next argument

One of the jobs of the kernel is to:

  • Manage the system’s resources
  • Turn source code into machine code
  • Load the operating system after the computer is turned on
  • Transfer mail from one machine to another

How can you get SQLCMD, when executing a SQL script file, to just output any errors or warnings it encounters?

I essentially dont want information based messages to be output.

asked Jun 28, 2012 at 11:04

bytedev's user avatar

It’s not possible to prevent SQLCMD returning non-error output messages by passing it a parameter.

However, what you can do is redirect error messages to STDERR, then direct all other messages to NUL.

This is done by passing the -r parameter. From books online:

-r[ 0 | 1] msgs to stderr

Redirects the error message output to the screen (stderr). If you do not specify a parameter or if you specify 0, only error messages that have a severity level of 11 or higher are redirected. If you specify 1, all error message output including PRINT is redirected. Has no effect if you use -o. By default, messages are sent to stdout.

Set -r depending on exactly which error messages you want to display, but to display all error message output, an example command would be:

sqlcmd -Q "select 1 as a; select 1/0 as b" -E -r1 1> NUL

answered Jun 28, 2012 at 12:20

Ed Harper's user avatar

Ed HarperEd Harper

21k4 gold badges55 silver badges80 bronze badges

2

Just as an addition to this, if you are sending errors out to file, I found this https://www.simple-talk.com/sql/sql-tools/the-sqlcmd-workbench/

which I have used. If you omit setting the OUT, then you only get an error log created.
So you have a command like this :

sqlcmd -x -E -S MyServer -i C:MySQLBatchToRun.sql 

Then in MySQLBatchToRun.sql , something like this

USE MyDatabase
:Error C:MyErrorLog.txt
:r C:MySQLScript.sql
GO

In MySQLScript.sql you have the actual SQL to run. It’s a bit convoluted, but works. The only issue I have is that it seems to create an empty error log file, even if there is not an error.

answered May 28, 2013 at 23:43

PabloInNZ's user avatar

PabloInNZPabloInNZ

4904 silver badges14 bronze badges

It looks like print statements are sent to stderr with -r1 so you can use them to log separate from your output like so:

sqlcmd -Q "print 'hello logfile';select 'Ted' as bro"  -r1 1> C:output.txt 2> C:logfile.txt

This also works with -i inputfile like:
sqlcmd -i helloTed.sql -r1 1> C:output.txt 2> C:logfile.txt

helloTed.sql:

print ‘hello logfile’;
select ‘Ted’ as bro

Probably you could use -Q and insert exec a stored proc that contains prints.

answered Mar 8, 2017 at 21:54

user3448451's user avatar

1

Понравилась статья? Поделить с друзьями:
  • Error messages error 1407742e
  • Error message wpf
  • Error message windows update
  • Error message the importer reported a generic error
  • Error message the file has an unsupported compression type