Quiz
Linux Exercises 1
Erstelle ein kostenloses Konto, um dieses Quiz zu beenden
Speichere deinen Fortschritt und sieh dir dein Endergebnis an.
oder mit deiner E-Mail registrieren
Schon ein Konto? Anmelden
Fragen in diesem Quiz (14)
1What does the pwd command accomplish?
- AIt parses web page URLS for display.
- BIt prints wide displays on narrow paper.
- CIt changes the current working directory.
- DIt prints the name of the working directory.
- EIt prints the terminal's width in characters.
2What is the effect of the following command?
$ myprog &> input.txt- AAll of these.
- BNone of these.
- CStandard error to myprog is taken from input.txt.
- DStandard input to myprog is taken from input.txt.
- EStandard output and standard error from myprog are written to input.txt.
3Which of the following regular expressions will match the strings dog, dug, and various other strings but not dig?
- Adi*g
- Bd.ig
- Cd.g
- Dd[ou]g
- Ed[o-u]g
4Which of the following commands will number the lines in aleph.txt? (Select three.)
- Anl aleph.txt
- Bfmt aleph.txt
- Cod -nl aleph.txt
- Dcat -n aleph.txt
- Ecat -b aleph.txt
5You type a command into bash and pass a long filename to it, but after you enter the command, you receive a File not found error message because of a typo in the filename. How might you proceed?
- ARetype the command, but press the Tab key after typing a few letters of the long filename to ensure that the filename is entered correctly.
- BPress the Up arrow key, and use bash's editing features to correct the typo.
- CAny of these.
- DNone of these.
- ERetype the command, and be sure type the filename correctly, letter by letter.
6How many commands can you pipe together at one?
- A4
- B16
- C2
- D3
7You want to store the standard output of the ifconfig command in a text file (file.txt) for future reference, and you want to wipe out any existing data in the file. You do not want to store standard error in this file. How can you accomplish these goals?
- Aifconfig >> file.txt
- Bifconfig > file.txt
- Cifconfig | file.txt
- Difconfig 2> file.txt
- Eifconfig < file.txt
8Which of the following commands will print lines from the file world.txt that contain matches to changes and changed?
- Ased change[d-s] world.txt
- Bgrep change[ds] world.txt
- Cfind world.txt "change(d|s)"
- Dcat world.txt changes changed
- Eod "change'd|s'" world.txt
9What is the effect of the following command?
$ pr report.txt | lpr- ATabs are converted to spaces in report.txt, and the result is saved in lpr.
- BThe files report.txt and lpr are combined together into one file and sent to standard output.
- CThe file report.txt is formatted for printing and sent to the lpr program.
- DNone of these.
- EThe file report.txt is printed, and any error messages are stored in the file lpr.
10How do the > and >> redirection operators?
- AThe > operator redirects standard output; the >> operator redirects standard input.
- BThe > operator redirects standard output; the >> operator redirects standard error.
- CThe > operator creates a new file or overwrites an existing one; the >> operator appends to an existing file or issues an error message if the specified file doesn't exist.
- DThe > operator creating a new file or overwritees an existing one; the >> operator creates a new file or appends to an existing one.
- EThe > operator writes to an existing file but fails if the file deson't exist; the >> operator writes to an existing file or creates a new one if it doesn't already exist.
11How does man display information by default on most Linux systems?
- AUsing the info browser
- BUsing the vi editor
- CUsing the less pager
- DUsing a custom X-based application
- EUsing the Firefox web browser
12You've received an ASCII text file (longlines.txt) that uses no carriage returns within paragraphs but two carriage returns between paragraphs. The result is that your preferred text editor displays each paragraph as a very long line. How can you reformat this file so that you can more easily edit (or a copy)?
- Agrep longlines.txt > longlines2.txt
- Bpr longlines.txt > longlonglines2.txt
- Ccat longlines.txt > longlines2.txt
- Dfmt longlines.txt > longlines2.txt
- Esed 's/Ctrl-M/NL/' longlines.txt
13You want to run an interactive script, gabby, which produces a lot of output in response to the user's inputs. To facilitate future study of this script, you want to copy its output to a file. How might you do this?
- Agabby 'gabby-out.txt'
- Bgabby &> gabby-out.txt
- Cgabby < gabby-out.txt
- Dgabby | tee gabby-out.txt
- Egabby > gabby-out.txt
14You type echo $PROC, and the computer replies Go away. What does this mean?
- AYour computer is handling to many processes; you must kill some of them to regain control of the computer.
- BThe remote computer PROC isn't accepting connections; you should contact its administrator to correct the problem.
- CNo currently running processes are associated with your shell so you may log out without terminating them.
- DOne of your configuration files, or a program you've run, has set the $PROC environment variable to Go away.
- EYour central processing unit (CPU) is defective and must be replaced as soon as possible.
Informationen
- Beschreibung
- Quiz am Linux Exercises 1, erstellt von krabby patty am 22/09/2016.
- Autor
- krabby patty
- Sprache
- English
- Aufrufe
- 4
- Bewertung
- Noch keine Bewertungen Bewerte dieses Quiz