what is the difference between Touch & cat command

Answer Posted / shan, chennai

Cat:-
Using the cat command, we will be able to create the new
file as well as put the required ocntent inside the files
(CNTL+d to come out the file after putting the content). At
a time only one file can create.

Touch:-
Using this command, we can create the more than one file at
a time without inserting the content (So file size will be
always ZERO).

Example:
$cat > test11.js
$touch test1.ls test2.js test3.js

Shan, Chennai

Is This Answer Correct ?    10 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the function of grep command in unix?

586


Describe the zip/unzip command using gzip.

608


What is grep short for?

556


What is $0 bash?

646


What's a command word?

584






What is “chmod” command?

563


How do I search a whole word in vim?

687


How to display no of records in oracle using unix command?

587


What is the use of the command 'ls -x chapter[1-5]' ?

659


What does the command '$ls | wc –l > file1' do?

677


How to find $ai_serual resolved path by using unix

1024


Which command is used to copy files?

555


How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?

758


What is the command to find maximum memory taking process on the server?

668


What are the general commands in using unix os for a beginner?

577