What is difference between "touch"and "cat" commands

Questions by krishnaraghava   answers by krishnaraghava

Showing Answers 1 - 3 of 3 Answers

Touch command is to create the 0 kb file and we can create several file at the same time. Example

Touch a b c d e

It will create 5( a b c d e) 0 KB files at the same time.

However, cat command help to create the file in writable format. once you write cat > file name it will allow you to type the text, enter ctrl+d to save and exit. if you will check  with the commant cat filename it will show the content of the file

  Was this answer useful?  Yes

xabiullah

  • May 4th, 2009
 

1.Touch:
          If file is already existing, it will update the time stamp.
          If the file does not exist, then 'touch file_name' creates a new file with 0 KB file size.

2. Cat:
        Dumps the contents of the file to the standard output , if no options specified.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions