what is the difference between Touch & cat command
Answer Posted / lafir gk
touch:- This can be used to create a file with size 0 and
to change the time stamp of a file.
cat:- This can be used to display the content of a
file,concatinate etc.
Ex :
# cat Example.txt
AIX
HPUX
SOLARIS
LINUX
touch command changes the modified date and time of the
file.
before use touch command
#ls -ltr
-rw-r--r-- 1 s file1 02 Nov 29 19:24 Example.txt
# touch Example.txt
#ls -ltr
-rw-r--r-- 1 s file1 02 Nov 29 19:43 Example.txt
Is This Answer Correct ? | 12 Yes | 3 No |
Post New Answer View All Answers
What is the search command in unix?
Describe the zip/unzip command using gzip.
What is the comma to show the space allocation of files?
What is the use of the command 'ls -x chapter[1-5]' ?
How does pipe () work?
What is awk used for?
Is command prompt unix?
What do chmod, chown, chgrp commands do?
Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?
What is unix command?
what is the advaantage of each user having its own copy of the shell?
What is {} in find command?
Explain the terms ‘system calls’ and ‘library functions’ with respect to unix commands?
hw will u use awk in replacing cahrs and files
Can you enlist some commonly used network commands?