MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which command is used to create a file
A
ls
B
cat
C
vi
D
lyrix
Explanation: 

Detailed explanation-1: -Using the cat command you can quickly create a file and put text into it. To do that, use the > redirect operator to redirect the text in the file. The file is created, and you can begin populating it with text.

Detailed explanation-2: -The touch command is the simplest way to create a new file from the command line. We can create multiple files by executing this command at once. To create a file, execute the touch command followed by the file name as given below: touch test1.

Detailed explanation-3: -The cat command reads each File parameter in sequence and writes it to standard output. If you do not specify a file name, the cat command reads from standard input. You can also specify a file name of-(dash) for standard input.

Detailed explanation-4: -The cat command is a very popular and versatile command in the ‘nix ecosystem. There are 4 common usages of the cat command. It can display a file, concatenate (combine) multiple files, echo text, and it can be used to create a new file.

There is 1 question to complete.