what is the difference between Touch & cat command

Answer Posted / prasanta

Both touch and cat commands are used to create a file.
but file created by touch will be of 0 byte i.e we can not
insert any data into the file and by using cat command we
can insert data into the file.

the advantage of touch command is that we can create as many
as possible files in a single command line.
ex:touh file1 file2 file3 file4...but we cannot do this
thing by using create command.

prasant kumar
prasantmuna@gmail.com

Is This Answer Correct ?    44 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hw will u use awk in replacing cahrs and files

2737


What is pipe command in unix?

677


How does shebang work?

594


What does touch command do in unix?

733


What is the use of awk command in unix?

583






Why is shebang used?

600


Differentiate cmp command from diff command.

592


What do know about tee command and its usage?

591


What does find command return in unix?

598


What does awk stand for?

615


Name the unix command to find how many days the server has been up.

609


how to sort the content of the file based on numeric values

1256


What is the functionality of a top command?

628


How do I find previous commands in unix?

596


What is the comma to show the space allocation of files?

562