image


LFCS Dumps LFCS Braindumps

LFCS Real Questions LFCS Practice Test LFCS Actual Questions


Linux-Foundation


LFCS


Linux Foundation Certified System Administrator


https://killexams.com/pass4sure/exam-detail/LFCS

Question #241

Given a file called birthdays containing lines like: YYYY-MM-DD Name -

1983-06-02 Tim

    1. 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?


      image

      1. grep '[56]' birthdays

        image

      2. grep 05?6? birthdays

        image

      3. grep '[0-9]*-0[56]-' birthdays

        image

      4. grep 06 birthdays | grep 05


Answer: C Question #242

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?


image

  1. test1 test2

    image

  2. test2 test1

    image

  3. script.sh test2

    image

  4. script.sh test1

    image

  5. test1 script.sh


Answer: B Question #243

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


image

  1. Use the tar command with -t.

    image

  2. Use the grep command.

    image

  3. Use the find command.

    image

  4. Use the zless command.

    image

  5. Use the zlist command.


Answer: A Question #244

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


image

  1. ;

    image

  2. *

    image

  3. #

    image

  4. /


Answer: C

What is the output of the following command sequence? for token in a b c; do

echo -n "$token "; done


image

  1. anbncn

    image

  2. a b c

    image

  3. "a " "b " "c "

    image

  4. token token token

    image

  5. abc


Answer: B Question #246

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


image

  1. unpack download.bz2

    image

  2. unzip2 download.bz2

    image

  3. bunzip2 download.bz2

    image

  4. unzip download.bz2

    image

  5. uncompress download.bz2


Answer: C Question #247

Which command chain will count the number of regular files with the name of foo.txt within /home?


image

  1. ls -lR /home | grep foo.txt | wc -l

    image

  2. find /home -type f -name foo.txt | wc -l

    image

  3. find /home -name foo.txt -count

    image

  4. find /home -name foo.txt | wc -l

    image

  5. grep -R foo.txt /home | wc -l


Answer: B Question #248

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


image

  1. echo "QUIDQUIDAGIS" >> foobar.txt

    image

  2. echo "QUIDQUIDAGIS" < foobar.txt

    image

  3. echo "QUIDQUIDAGIS" > foobar.txt

    image

  4. echo "QUIDQUIDAGIS" | foobar.txt


Answer: C Question #249

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


image

  1. cmd || foo.txt

    image

  2. cmd | foo.txt

    image

  3. cmd && foo.txt

    image

  4. cmd >> foo.txt

    image

  5. cmd > foo.txt

Answer: E Question #250

What does the exit status 0 indicate about a process?


image

  1. The process ended without any problems.

    image

  2. The process was terminated by the user.

    image

  3. The process couldn't finish correctly.

    image

  4. The process waited for an input but got none.

    image

  5. The process finished in time.


Answer: A Question #251

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)


image

  1. grep -v fred data_file

    image

  2. grep '[f]red' data_file

    image

  3. egrep fred data_file

    image

  4. grep '[Ff]red' data_file

    image

  5. grep -i fred data_file


Answer: DE Question #252

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


image

  1. actdat=`date`

    image

  2. set actdat='date'

    image

  3. date | actdat

    image

  4. date > $actdat

    image

  5. actdat=date


Answer: A Question #253

SIMULATION -

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


Answer: #! Question #254

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


image

  1. find . -name MyFile.xml

    image

  2. grep MyFile.xml | find

    image

  3. grep -r MyFile.xml .

    image

  4. less MyFile.xml

    image

  5. search Myfile.xml ./


Answer: A

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


image

  1. text=olaf\ is\ home

    image

  2. text=$olaf is home

    image

  3. $text='olaf is home'

    image

  4. text=='olaf is home'

    image

  5. text="olaf is home"


Answer: AE Question #256

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


image

  1. tar /home backup.tar

    image

  2. tar -cf /home backup.tar

    image

  3. tar -xf /home backup.tar

    image

  4. tar -xf backup.tar /home

    image

  5. tar -cf backup.tar /home


Answer: E


image

6$03/( 48(67,216


7KHVH TXHVWLRQV DUH IRU GHPR SXUSRVH RQO\ )XOO YHUVLRQ LV XS WR GDWH DQG FRQWDLQV DFWXDO TXHVWLRQV DQG DQVZHUV


.LOOH[DPV FRP LV DQ RQOLQH SODWIRUP WKDW RIIHUV D ZLGH UDQJH RI VHUYLFHV UHODWHG WR FHUWLILFDWLRQ H[DP SUHSDUDWLRQ 7KH SODWIRUP SURYLGHV DFWXDO TXHVWLRQV H[DP GXPSV DQG SUDFWLFH WHVWV WR KHOS LQGLYLGXDOV SUHSDUH IRU YDULRXV FHUWLILFDWLRQ H[DPV ZLWK FRQILGHQFH +HUH DUH VRPH NH\ IHDWXUHV DQG VHUYLFHV RIIHUHG E\ .LOOH[DPV FRP


$FWXDO ([DP 4XHVWLRQV .LOOH[DPV FRP SURYLGHV DFWXDO H[DP TXHVWLRQV WKDW DUH H[SHULHQFHG LQ WHVW FHQWHUV 7KHVH TXHVWLRQV DUH XSGDWHG UHJXODUO\ WR HQVXUH WKH\ DUH XS WR GDWH DQG UHOHYDQW WR WKH ODWHVW H[DP V\OODEXV %\ VWXG\LQJ WKHVH DFWXDO TXHVWLRQV FDQGLGDWHV FDQ IDPLOLDUL]H WKHPVHOYHV ZLWK WKH FRQWHQW DQG IRUPDW RI WKH UHDO H[DP


([DP 'XPSV .LOOH[DPV FRP RIIHUV H[DP GXPSV LQ 3') IRUPDW 7KHVH GXPSV FRQWDLQ D FRPSUHKHQVLYH FROOHFWLRQ RI TXHVWLRQV DQG DQVZHUV WKDW FRYHU WKH H[DP WRSLFV %\ XVLQJ WKHVH GXPSV FDQGLGDWHV FDQ HQKDQFH WKHLU NQRZOHGJH DQG LPSURYH WKHLU FKDQFHV RI VXFFHVV LQ WKH FHUWLILFDWLRQ H[DP


3UDFWLFH 7HVWV .LOOH[DPV FRP SURYLGHV SUDFWLFH WHVWV WKURXJK WKHLU GHVNWRS 9&( H[DP VLPXODWRU DQG RQOLQH WHVW HQJLQH 7KHVH SUDFWLFH WHVWV VLPXODWH WKH UHDO H[DP HQYLURQPHQW DQG KHOS FDQGLGDWHV DVVHVV WKHLU UHDGLQHVV IRU WKH DFWXDO H[DP 7KH SUDFWLFH WHVWV FRYHU D ZLGH UDQJH RI TXHVWLRQV DQG HQDEOH FDQGLGDWHV WR LGHQWLI\ WKHLU VWUHQJWKV DQG ZHDNQHVVHV


*XDUDQWHHG 6XFFHVV .LOOH[DPV FRP RIIHUV D VXFFHVV JXDUDQWHH ZLWK WKHLU H[DP GXPSV 7KH\ FODLP WKDW E\ XVLQJ WKHLU PDWHULDOV FDQGLGDWHV ZLOO SDVV WKHLU H[DPV RQ WKH ILUVW DWWHPSW RU WKH\ ZLOO UHIXQG WKH SXUFKDVH SULFH 7KLV JXDUDQWHH SURYLGHV DVVXUDQFH DQG FRQILGHQFH WR LQGLYLGXDOV SUHSDULQJ IRU FHUWLILFDWLRQ H[DPV


8SGDWHG &RQWHQW .LOOH[DPV FRP UHJXODUO\ XSGDWHV LWV TXHVWLRQ EDQN DQG H[DP GXPSV WR HQVXUH WKDW WKH\ DUH FXUUHQW DQG UHIOHFW WKH ODWHVW FKDQJHV LQ WKH H[DP V\OODEXV 7KLV KHOSV FDQGLGDWHV VWD\ XS WR GDWH ZLWK WKH H[DP FRQWHQW DQG LQFUHDVHV WKHLU FKDQFHV RI VXFFHVV


7HFKQLFDO 6XSSRUW .LOOH[DPV FRP SURYLGHV IUHH [ WHFKQLFDO VXSSRUW WR DVVLVW FDQGLGDWHV ZLWK DQ\ TXHULHV RU LVVXHV WKH\ PD\ HQFRXQWHU ZKLOH XVLQJ WKHLU VHUYLFHV 7KHLU FHUWLILHG H[SHUWV DUH DYDLODEOH WR SURYLGH JXLGDQFH DQG KHOS FDQGLGDWHV WKURXJKRXW WKHLU H[DP SUHSDUDWLRQ MRXUQH\


'PS .PSF FYBNT WJTJU IUUQT LJMMFYBNT DPN WFOEPST FYBN MJTU

.LOO \RXU H[DP DW )LUVW $WWHPSW *XDUDQWHHG