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 awk command used for?
What are filter commands in unix?
what is the advaantage of each user having its own copy of the shell?
What is the use of the command 'ls -x chapter[1-5]' ?
What is nr in awk command?
What is the difference between awk and grep?
Can you explain a little bit about command substitution?
What is s and g in sed command?
What is the behavioural difference between cmp and diff commands?
What is the use of awk command in unix?
hw will u use awk in replacing cahrs and files
Can you enlist some commonly used network commands?
What is grep r?
Give the command for finding the current date.
What is used to type command?