nerdexam
GIAC

GSNA · Question #67

John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux- based network. John is working as a root user on the Linux operating system. He has a data.txt file in which…

The correct answer is A. expand -t 1 data.txt > data.txt. According to the scenario, John can replace the TAB characters with single space characters with the expand command. With the expand -t 1 data.txt > data.txt command, the TABs of data.txt are changed into single spaces and are redirected by using the > command into the data.txt…

Linux/Unix System Auditing

Question

John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux- based network. John is working as a root user on the Linux operating system. He has a data.txt file in which each column is separated by the TAB character. Now, he wants to use this file as input for a data mining software he has created. The problem preventing him from accomplishing his task is that with his data mining software, he has used TAB as a delimiter to distinguish between columns. Hence, he is unable to use this file as input for the software. However, if he somehow replaces the TAB characters of the file with SPACE characters, he can use this file as an input file for his data mining software. Which of the following commands will John use to replace the TAB characters of the file with SPACE characters?

Options

  • Aexpand -t 1 data.txt > data.txt
  • Bcat data.txt
  • Cchmod 755 data.txt
  • Dtouch data.txt

How the community answered

(28 responses)
  • A
    75% (21)
  • B
    14% (4)
  • C
    7% (2)
  • D
    4% (1)

Explanation

According to the scenario, John can replace the TAB characters with single space characters with the expand command. With the expand -t 1 data.txt > data.txt command, the TABs of data.txt are changed into single spaces and are redirected by using the > command into the data.txt file. Now, John can use the data.txt file as the input file for his data mining software.

Topics

#expand command#TAB characters#Linux text processing#shell commands

Community Discussion

No community discussion yet for this question.

Full GSNA Practice