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 grep and how do you use it?

661


Why is it called grep?

645


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

695


What is unix command?

690


Write a command that will find all text files in a directory such that it does not contain the word "amazing" in any form (that is, it must include the words amazing, amazing, or amazing)?

1068






what is the advaantage of each user having its own copy of the shell?

2148


What is difference between grep and find command in unix?

669


What is {} in find command?

661


Can you explain a little bit about command substitution?

709


Name the general commands in using unix os for a beginner?

697


What does the md command do?

659


How does shebang work?

688


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

770


What is awk used for?

699


What is nr in awk command?

695