Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation LFCA Exam - Topic 1 Question 31 Discussion

Posted by Aliza on Sep 15, 2024 at 02:24 PM

When using vi or vim to edit a file, how do you exit without saving?

Suggested Answer: C

Get Premium LFCA Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
43 comments · newest first
JO
Jovita 11 months ago
Really? I always thought you could just close the terminal!
DO
Dorsey 11 months ago
I thought ZZ would work too, but it saves changes!
JO
Josue 12 months ago
Wait, isn't :exit also a valid command?
JE
Jennifer 12 months ago
Totally agree, :q! is the way to go!
CA
Carissa 1 year ago
It's definitely :q! to exit without saving.
AL
Alana 1 year ago
I’m leaning towards :q! as the answer, but I might be mixing it up with another command I practiced.
KE
Kenny 1 year ago
I feel like I’ve seen :exit before, but I’m pretty sure that’s not the right command for quitting without saving.
RI
Ricarda 1 year ago
I remember practicing this, and I think :wq! is for saving, not exiting without saving.
AD
Adelina 1 year ago
I think to exit without saving, it's definitely something like :q!, but I’m not 100% sure.
FE
Felice 1 year ago
Ah, the old vi/vim exit without saving trick. It's been a while since I've used it, but I'm pretty sure the answer is A, ":q!". That should do the trick.
NA
Nathan 1 year ago
I'm a bit confused by this question. I don't use vi/vim very often, so I can't remember the exact command for exiting without saving. I'll have to guess on this one.
DO
Dominga 1 year ago
Okay, I've got this. The way to exit vi/vim without saving is to use the ":q!" command. It's a classic vi/vim trick that I've used many times.
BE
Benton 1 year ago
Hmm, I'm a bit unsure about this one. I know there are different ways to exit vi/vim, but I can't remember the exact command for exiting without saving. I'll have to think about this one.
WE
Wenona 1 year ago
I'm pretty sure the answer is A. I've used vi/vim before and ":q!" is the command to exit without saving.
RE
Rebbecca 1 year ago
Hmm, I think it has to do with flexible channel spacing, but I'm not 100% confident. I'll try to remember the key points about Flexgrid and see if that helps me narrow down the answer.
GE
Geraldine 1 year ago
Wait, you can exit vi without saving? Whoa, mind blown! :q! is the one, I'm remembering that for the next time I accidentally launch vi and panic.
JE
Jettie 1 year ago
↳ replying to Geraldine
It's a lifesaver when you accidentally open vi and need to get out quickly!
BU
Burma 1 year ago
↳ replying to Geraldine
I always forget the command too, but :q! is definitely the one to remember.
MI
Miesha 1 year ago
↳ replying to Geraldine
Yeah, :q! is the way to go if you want to exit without saving.
RO
Ronny 1 year ago
C) :wq! would save the file before exiting, which is the opposite of what I want. :q! is the way to go here.
GU
Gussie 1 year ago
↳ replying to Ronny
A) :q!
LA
Lashaunda 1 year ago
↳ replying to Ronny
B) ZZ
CH
Chu 1 year ago
↳ replying to Ronny
A) :q!
CR
Crista 2 years ago
D) :exit sounds like it could work, but I'm not sure if that's a valid command in vi/vim. Better stick with the classic :q! just to be safe.
TA
Tamra 1 year ago
↳ replying to Crista
C) :wq! is another good option to exit and save the changes.
NO
Noe 1 year ago
↳ replying to Crista
A) Yeah, better safe than sorry with :q!.
JE
Jeffrey 1 year ago
↳ replying to Crista
B) ZZ is also a valid command to exit without saving.
CH
Cherelle 1 year ago
↳ replying to Crista
A) :q! sounds like the safest option.
LU
Luisa 1 year ago
↳ replying to Crista
D) :exit
CO
Colette 1 year ago
↳ replying to Crista
C) :wq!
JU
Junita 1 year ago
↳ replying to Crista
B) ZZ
NO
Noah 1 year ago
↳ replying to Crista
A) :q!
ST
Steffanie 2 years ago
But :q! is the command to quit without saving in vi or vim
NI
Nikita 2 years ago
B) ZZ seems like it might work, but I'm pretty sure that's for saving and exiting, not just exiting without saving. I'm going with A) :q!.
ZA
Zachary 1 year ago
↳ replying to Nikita
B) Yeah, you're right. ZZ is for saving and exiting. :q! is the one for just exiting.
CH
Chauncey 1 year ago
↳ replying to Nikita
A) :q! is the correct command to exit without saving in vi or vim.
JA
Jamal 2 years ago
I disagree, I believe the correct answer is B) ZZ
DA
Daniel 2 years ago
The :q! command is definitely the way to exit without saving in vi or vim. I always use that when I accidentally make changes I don't want to keep.
PA
Pamella 1 year ago
↳ replying to Daniel
No problem, happy to help!
LE
Leila 1 year ago
↳ replying to Daniel
I always forget the command, thanks for the reminder.
WI
William 1 year ago
↳ replying to Daniel
Yeah, it's a lifesaver when you make a mistake.
TO
Tomoko 1 year ago
↳ replying to Daniel
I agree, :q! is the way to go.
ST
Steffanie 2 years ago
I think the answer is A) :q!
0/2000 characters

Save Cancel