MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following command is used to create file in Linux?
A
touch
B
cat
C
echo
D
All of the above
Explanation: 

Detailed explanation-1: -The cat command is one of the most used commands in Linux. It is used to create a file, display the content of the file, concatenate the contents of multiple files, display the line numbers, and more.

Detailed explanation-2: -Create New Files With touch To create an empty file using touch, type touch followed by the filename. The aforementioned command will create a new file named newemptyfile in the current working directory. You can verify that the file has been created using the ls command.

Detailed explanation-3: -The touch command’s primary function is to modify a timestamp. Commonly, the utility is used for file creation, although this is not its primary function. The terminal program can change the modification and access time for any given file. The touch command creates a file only if the file doesn’t already exist.

Detailed explanation-4: -The touch command updates the access and modification times of each file specified by the File parameter of each directory specified by the Directory parameter. If you do not specify a value for the Time variable, the touch command uses the current time.

Detailed explanation-5: -1) touch command As simple as that, just type the word touch followed by the name of the file you like to give it, and Voila!

There is 1 question to complete.