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?
Which command can you use to find the currently running process in unix server?
How do I find previous commands in unix?
what is the advaantage of each user having its own copy of the shell?
Name the general commands in using unix os for a beginner?
How do I clear my terminal history?
What does grep v do?
Is it inbetween or in between?
Can you enlist some commonly used network commands?
What is unix command line?
What is pipe command in unix?
What is the difference between grep and grep?
What is the use of egrep command in unix?
How do I use grep to search for a file?
How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?