For the accompanying inquiries enter the answer and give complete explanation or
ID: 3696939 • Letter: F
Question
For the accompanying inquiries enter the answer and give complete explanation or rational for your answer with examples and charts when required. enter the screen showing execution the execution of the command in Linux workstation alongside the clarification (you might have the capacity to utilize the Linux command brief in your Mac's). .
1 .You are not familiar with the exact name of a file. You know that it is unique and can remember the first four letters of the name. What key can you press in a Linux shell to attempt to auto-complete the name?
A. Right arrow
B. Left arrow
C. Tab
D. ~
: Explanation
:2 You would like to store the results of the ps command in a file named process_data. What command should you run?
A. ps | process_data
B. ps < process_data
C. ps > process_data
D. :
Explanation: run the command against an existing process in your VM or EC2 instance and submit the screen picture.
3. You would like to run the word count command (wc) to count the number of words in a file named data_file. What syntax should you use?
A. wc > data_file
B. wc < data_file
C. wc ~ data_file
D. wc ! data_file :
Explanation:
4. You come across two Linux commands that attempt to redirect the output of one command to the input of another. They look like this: ps > process_data wc –l < process_data What single command could you use to achieve the same goal without using an intermediate file?
A. ps | wc -l
B. ps >> process_data
C. ps | process_data > wc -l
D. process_data < ps > wc -l
: Explanation:
5 You are keeping a running history of the users logged into a system with input generated by the who command. You would like to run a command every five minutes that appends the output to a file named user_history. What command should you use?
A. who > user_history
B. who >> user_history
C. who < user_history
D. who << user_history
Explanation:
Explanation / Answer
1 .You are not familiar with the exact name of a file. You know that it is unique and can remember the first four letters of the name. What key can you press in a Linux shell to attempt to auto-complete the name?
A. Right arrow
B. Left arrow
C. Tab
D. ~
: Explanation
A tab when pressed will fill the incomplete filename if unique combination is found. If there is an ambiguity, it will be filled to that point, and will wait for continuation.
:2 You would like to store the results of the ps command in a file named process_data. What command should you run?
A. ps | process_data
B. ps < process_data
C. ps > process_data
D. :
Explanation: run the command against an existing process in your VM or EC2 instance and submit the screen picture.
When you execute a command, the usual output is a console. Whereas, if you re-direct the output to a file, using the re-direction operator '>', here whatever the file name is given, the output of the first command will be redirected to the filename specified.
3. You would like to run the word count command (wc) to count the number of words in a file named data_file. What syntax should you use?
A. wc > data_file
B. wc < data_file
C. wc ~ data_file
D. wc ! data_file :
Explanation: The other input re-direction operator is '<'. Whatever the file name specified, if you use the input-redirection, the first command will take the input from that file, instead of reading the input from the console.
4. You come across two Linux commands that attempt to redirect the output of one command to the input of another. They look like this: ps > process_data wc –l < process_data What single command could you use to achieve the same goal without using an intermediate file?
A. ps | wc -l
B. ps >> process_data
C. ps | process_data > wc -l
D. process_data < ps > wc -l
: Explanation:
The pipe operator '|' will pipeline the output of one command as input to the other command.
5 You are keeping a running history of the users logged into a system with input generated by the who command. You would like to run a command every five minutes that appends the output to a file named user_history. What command should you use?
A. who > user_history
B. who >> user_history
C. who < user_history
D. who << user_history
Explanation: The other kind of output re-direction operator is '>>', which will append the data to the specified file.