U.S. Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation LFCS Exam - Topic 9 Question 2 Discussion

Which command will display the last line of the file foo.txt?
D) tail -n 1 foo.txt
A) head -n 1 foo.txt
B) tail foo.txt
C) last -n 1 foo.txt

Linux Foundation LFCS Exam - Topic 9 Question 2 Discussion

Actual exam question for Linux Foundation's LFCS exam
Question #: 2
Topic #: 9
[All LFCS Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

0/2000 characters
Kathrine
8 months ago
Yeah, tail is the way to go!
upvoted 0 times
...
Delpha
8 months ago
Wait, is last -n even a real command?
upvoted 0 times
...
Ranee
8 months ago
No way, I always use tail for this.
upvoted 0 times
...
Cherry
8 months ago
I thought it was B, but D is correct!
upvoted 0 times
...
Fernanda
8 months ago
It's definitely D, tail -n 1 shows the last line.
upvoted 0 times
...
Venita
8 months ago
I'm pretty sure "tail -n 1" is the correct answer. It seems like the most logical option for getting the last line of a file.
upvoted 0 times
...
Katlyn
8 months ago
I thought "last" was a command too, but I don't think it applies to files like this. I might be mixing it up with something else.
upvoted 0 times
...
Leeann
8 months ago
I remember practicing with "head" and "tail," but I can't recall which one specifically shows the last line. I feel like "tail" is the right choice.
upvoted 0 times
...
Marguerita
9 months ago
I think the command to show the last line is something with "tail," but I'm not sure if it's just "tail" or if it needs the "-n" option.
upvoted 0 times
...
Tequila
9 months ago
Hmm, I'm a bit unsure about this one. I can see the appeal of trying to build rapport with some humor, but that might come across as unprofessional. I think I'd lean towards just sticking with it and working through the language barrier, even if it gets frustrating.
upvoted 0 times
...
Cyril
9 months ago
I've got a good strategy for this. I'll eliminate the options I know are standard opinions, then choose the one that's left. Gotta love process of elimination!
upvoted 0 times
...
Galen
9 months ago
I'm not entirely sure about this one. The question seems a bit tricky, and I'm not familiar with the Decode function. I'll need to think it through carefully.
upvoted 0 times
...

Save Cancel