The Linux Foundation LFCS Linux Foundation Certified System Administrator Online Training
The Linux Foundation LFCS Online Training
The questions for LFCS were last updated at Nov 23,2024.
- Exam Code: LFCS
- Exam Name: Linux Foundation Certified System Administrator
- Certification Provider: The Linux Foundation
- Latest update: Nov 23,2024
What does the symbol within regular expressions represent?
- A . Match the preceding qualifier one or more times.
- B . Match the preceding qualifier zero or more times.
- C . Match the preceding qualifier zero or one times.
- D . Match a literal character.
In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows?
- A . By using the command :repeat followed by the number and the command.
- B . By specifying the number right in front of a command such as 4l or 2yj.
- C . By selecting all affected lines using the shift and cursor keys before applying the command.
- D . By issuing a command such as :set repetition=4 which repeats every subsequent command 4 times.
Which of the following files, located in the user home directory, is used to store the Bash history?
- A . .bash_history
- B . .bash_histfile
- C . .history
- D . .bashrc_history
- E . .history_bash
SIMULATION
Which Bash environment variable defines in which file the user history is stored when exiting a Bash process? (Specify ONLY the variable name.)
Which of the following commands displays the contents of a gzip compressed tar archive?
- A . gzip archive.tgz | tar xvf
- B . tar ztf archive.tgz
- C . gzip -d archive.tgz | tar tvf
- D . tar cf archive.tgz
Which grep command will print only the lines that do not end with a / in the file foo?
- A . grep ‘/$’ foo
- B . grep ‘/#’ foo
- C . grep -v ‘/$’ foo
- D . grep -v ‘/#’ foo
Which of the following commands is used to change options and positional parameters for a running Bash?
- A . history
- B . set
- C . bashconf
- D . setsh
- E . envsetup
Which of the following commands replaces each occurrence of ‘bob’ in the file letter with ‘Bob’ and writes the result to the file newletter?
- A . sed ‘/bob/Bob’ letter > newletter
- B . sed s/bob/Bob/ letter < newletter
- C . sed ‘s/bob/Bob’ letter > newletter
- D . sed ‘s/bob/Bob/g’ letter > newletter
- E . sed ‘s/bob, Bob/’ letter > newletter
From a Bash shell, which of the following commands directly executes the instruction from the file /usr/ local/bin/runme.sh without starting a subshell? (Please select TWO answers.)
- A . source /usr/local/bin/runme.sh
- B . . /usr/local/bin/runme.sh
- C . /bin/bash /usr/local/bin/runme.sh
- D . /usr/local/bin/runme.sh
- E . run /usr/local/bin/runme.sh
Regarding the command: nice -5 /usr/bin/prog Which of the following statements is correct?
- A . /usr/bin/prog is executed with a nice level of -5.
- B . /usr/bin/prog is executed with a nice level of 5.
- C . /usr/bin/prog is executed with a priority of -5.
- D . /usr/bin/prog is executed with a priority of 5.