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

why metadb requires a seperate slice to create Solaris volume manager

2552


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

659


What is the difference between cat and more command?

623


Which command is used to restrict incoming messages?

590


How do I delete files from command prompt?

549






What is the unix command to confirm a remote host is alive or not?

577


Explain the steps that a shell follows while processing a command.

681


Why is shebang used?

593


Describe the usage and functionality of the command rm –r * in unix?

820


What are file commands?

648


How do you repeat a command in terminal?

587


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

667


What does the md command do?

567


What do know about tee command and its usage?

584


What are the commands in UNIX to list the files in a Directory?

614