Computer Science - Linux - Discussion

Discussion :: Linux - Section 2 (Q.No.42)


What command is used to display and create files?

[A]. lyrix
[B]. ed
[C]. vi
[D]. cat
[E]. None of the above

Answer: Option D


No answer description available for this question.

Tigran said: (Oct 31, 2014)  
Using vi command is also possible to create and display files.

Using cat for creating file it is unusual method I think.

S.G.Dilshath said: (Sep 30, 2016)  
We can't create the file by using cat.

Shikha Yadav said: (Feb 20, 2017)  
We can create using cat, so cat is the answer.

Anjali said: (Feb 11, 2018)  
Vi also creates new file.

Md Saddam Hossain said: (Sep 28, 2021)  
To create a new file, use the cat command followed by the redirection operator (>) and the name of the file you want to create.

Press Enter, type the text and once you are done, press the CRTL+D to save the file.

In the following example, we are creating a new file named file1.txt:

cat > file1.txt.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.