Linux Essentials Certificate Exam, version 1.5 v5.0

Page:    1 / 6   
Exam contains 80 questions

How can the current directory and its subdirectories be searched for the file named
MyFile.xml?

  • A. find . -name MyFile.xml
  • B. grep MyFile.xml | find
  • C. grep -r MyFile.xml .
  • D. less MyFile.xml
  • E. search Myfile.xml ./


Answer : A

The script, script.sh, consists of the following lines:
#!/bin/bash
echo $2 $1
Which output will appear if the command, ./script.sh test1 test2, is entered?

  • A. test1 test2
  • B. test2 test1
  • C. script.sh test2
  • D. script.sh test1
  • E. test1 script.sh


Answer : B

Which of the following commands will set the variable text to olaf is home? (Choose two)

  • A. text=olaf\ is\ home
  • B. text=$olaf is home
  • C. $text='olaf is home'
  • D. text=='olaf is home'
  • E. text="olaf is home"


Answer : AE

What is the correct command to extract the contents of the archive file download.bz2?

  • A. unpack download.bz2
  • B. unzip2 download.bz2
  • C. bunzip2 download.bz2
  • D. unzip download.bz2
  • E. uncompress download.bz2


Answer : C

Which approach will provide a listing of the contents in a tar archive?

  • A. Use the tar command with -t.
  • B. Use the grep command.
  • C. Use the find command.
  • D. Use the zless command.
  • E. Use the zlist command.


Answer : A

The output of the program date should be saved in the variable actdat. What is the correct statement?

  • A. actdat=`date`
  • B. set actdat='date'
  • C. date | actdat
  • D. date > $actdat
  • E. actdat=date


Answer : A

Which of the following commands will create an archive file, named backup.tar, containing all the files from the directory /home?

  • A. tar /home backup.tar
  • B. tar -cf /home backup.tar
  • C. tar -xf /home backup.tar
  • D. tar -xf backup.tar /home
  • E. tar -cf backup.tar /home


Answer : E

Which of the following commands redirects the output of cmd to the file foo.txt, in which an existing file is overwritten?

  • A. cmd || foo.txt
  • B. cmd | foo.txt
  • C. cmd && foo.txt
  • D. cmd >> foo.txt
  • E. cmd > foo.txt


Answer : E

Which command will display the last line of the file foo.txt?

  • A. head -n 1 foo.txt
  • B. tail foo.txt
  • C. last -n 1 foo.txt
  • D. tail -n 1 foo.txt


Answer : D

What is the output of the following command sequence?
for token in a b c; do
echo -n "$token ";
done

  • A. anbncn
  • B. a b c
  • C. "a " "b " "c "
  • D. token token token
  • E. abc


Answer : B

Which of the following commands will output all of the lines with the name Fred in upper or lower case but not the word red from the file data_file? (Choose two)

  • A. grep -v fred data_file
  • B. grep '[f]red' data_file
  • C. egrep fred data_file
  • D. grep '[Ff]red' data_file
  • E. grep -i fred data_file


Answer : D,E

Given a file called birthdays containing lines like:

YYYY-MM-DD Name -
1983-06-02 Tim
1995-12-17 Sue
Which command would you use to output the lines belonging to all people listed whose birthday is in May or June?

  • A. grep '[56]' birthdays
  • B. grep 05?6? birthdays
  • C. grep '[0-9]*-0[56]-' birthdays
  • D. grep 06 birthdays | grep 05


Answer : C

What two character sequence is present at the beginning of an interpreted script? (Please specify the TWO correct characters only)



Answer : #!

Which of the following command sequences overwrites the file foobar.txt?

  • A. echo "QUIDQUIDAGIS" >> foobar.txt
  • B. echo "QUIDQUIDAGIS" < foobar.txt
  • C. echo "QUIDQUIDAGIS" > foobar.txt
  • D. echo "QUIDQUIDAGIS" | foobar.txt


Answer : C

Which character starts a comment line in a shell script file?

  • A. ;
  • B. *
  • C. #
  • D. /


Answer : C

Page:    1 / 6   
Exam contains 80 questions

Talk to us!


Have any questions or issues ? Please dont hesitate to contact us

Certlibrary.com is owned by MBS Tech Limited: Room 1905 Nam Wo Hong Building, 148 Wing Lok Street, Sheung Wan, Hong Kong. Company registration number: 2310926
Certlibrary doesn't offer Real Microsoft Exam Questions. Certlibrary Materials do not contain actual questions and answers from Cisco's Certification Exams.
CFA Institute does not endorse, promote or warrant the accuracy or quality of Certlibrary. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.
Terms & Conditions | Privacy Policy