what is the difference between Touch & cat command
Answer Posted / sivasankar.s
cat command displays the contents of the file.
Ex :
$ cat fruits.txt
apple
orange
grapes
touch command changes the modified date and time of the
file.
before use touch command
$ls -ltr
-rw-r--r-- 1 s aaa 20 Oct 29 16:39 fruits.txt
$ touch fruits.txt
$ls -ltr
-rw-r--r-- 1 s aaa 20 Oct 29 16:51 fruits.txt
| Is This Answer Correct ? | 56 Yes | 12 No |
Post New Answer View All Answers
How do I delete files from command prompt?
What is unix command?
How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?
Differentiate cmp command from diff command.
Explain command to show the space allocation of files?
Is grep faster than awk?
hw will u use awk in replacing cahrs and files
What are the commands in UNIX to list the files in a Directory?
What is grep r?
How do I clear my terminal history?
What is the unix command to confirm a remote host is alive or not?
What is the use of egrep command in unix?
What is {} in find command?
What do chmod command do?
What is the use of finger command?