what is the difference between Touch & cat command
Answer Posted / sricharan
touch:
It can be used to create 0 byte empty file.
syntax: touch filename.txt
we can create multiple file using touch command.
syntax: touch file1.txt file2.txt file3.txt ..... filen.txt
touch commnad is also used to update time stamp
Syntax:touch filename
cat:
It can be use to view the file.
Syntax:cat filename
It can be use to append the existing file.
syntax: cat >> filename
It can be use to concatinate n number of files to one file.
syntax: cat file1 file2 file3 file4 >> newfile
cat is also used to create a file
syntax: cat filename
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Which command is used to delete all files in the current directory and all its sub-directories?
What is the comma to show the space allocation of files?
What is used to type command?
Can you explain a little bit about command substitution?
What is the command to view process running?
What is the use of the command 'ls -x chapter[1-5]' ?
How do I delete files from command prompt?
Name the unix command to find how many days the server has been up.
What's a command word?
What is sed awk grep?
How many unix commands are there?
What does the “echo” command do?
What is difference between grep and find command in unix?
Explain ‘system calls’ with respect to unix commands?
Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.