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 used to type command?
What is the difference between cat and more command?
Which command is used to find whether the system is 32 bit or 64 bit?
What command will change your prompt to myprompt?
Explain how to use grep command to list find the records of a file containing 10 different strings?
How to find $ai_serual resolved path by using unix
What are the dos commands?
Is ‘du’ a command? If so, what is its use?
What command is used to switching between users in unix?
Describe the zip/unzip command using gzip.
What is s and g in sed command?
What is the command to compare two files in unix?
What is the command to view process running?
How do I clear my terminal history?
What is command substitution?