In vi editor how do you execute unix commands?

Answers were Sorted based on User's Feedback



In vi editor how do you execute unix commands?..

Answer / km

:! cmd execute a single command (cmd) and return to vi

Is This Answer Correct ?    22 Yes 6 No

In vi editor how do you execute unix commands?..

Answer / manikantan t s

using ':!'

Is This Answer Correct ?    16 Yes 1 No

In vi editor how do you execute unix commands?..

Answer / kakoli

:![command]

Is This Answer Correct ?    9 Yes 2 No

In vi editor how do you execute unix commands?..

Answer / pritesh_8

you can execute as
for example
:filename.c
this will copy current file in vi editor into filename.c
although it is not unix cmd but makes the use of cp cmd

Is This Answer Correct ?    7 Yes 3 No

In vi editor how do you execute unix commands?..

Answer / ravi kumar.r

compiling filename.c and then execution ./a.out

Is This Answer Correct ?    6 Yes 2 No

In vi editor how do you execute unix commands?..

Answer / durgesh srivastava

!wq or we use shift+ZZ

Is This Answer Correct ?    1 Yes 1 No

In vi editor how do you execute unix commands?..

Answer / santhosh

we have 3 modes i.e {vi editor}
1.inserted mode
2.extended mode
3.command mode
by default ur in command mode when entering into vi..
if want excute any command just steps are ..
go to command mode i.e ESC+:what command u wish that one
ex-- esc+:pwd
esc+:date

Is This Answer Correct ?    0 Yes 0 No

In vi editor how do you execute unix commands?..

Answer / hanu

system("Command-Nmae");

Is This Answer Correct ?    3 Yes 9 No

In vi editor how do you execute unix commands?..

Answer / shilpa

gcc filename

Is This Answer Correct ?    5 Yes 16 No

In vi editor how do you execute unix commands?..

Answer / amulya

:wq!
(or)
:wq

Is This Answer Correct ?    5 Yes 17 No

Post New Answer

More Unix Commands Interview Questions

How to add content of one file into another file at the beginning

12 Answers  


What is the use of pipes?

4 Answers  


When the shell is reading the command line what is the difference between text enclosed between double quotes ( ” ) and text enclosed between signal quotes ( ’ )?

3 Answers  


write grep commands to select the lines that have exactly two characters

8 Answers   PSI Data Systems,


Which command should you use to find the remaining disk space in unix server?

0 Answers  






What does pipe () return?

0 Answers  


What is the use of awk command in unix?

0 Answers  


Explain ‘system calls’ with respect to unix commands?

0 Answers  


What will the following command do?

0 Answers  


what is difference between unix and linux?

6 Answers   IBM, Shell, Wipro,


How to set sticky bit, or it have any seperate directory to create sticky bit in sunfir servers. Please help me , i don't no the exact answer?

4 Answers   HCL, Wipro,


What do chgrp command do?

0 Answers  


Categories