Create a file in unix

cat command is used to create a file.

$ cat >text1

It will allow you to add contents into text1 file.

press ctrl+C  to save you added content into text1 file.


Create file with echo command

echo is also used to create a file


echo “This is a test” >test1


This will create a file named test1.









Please follow and like us:

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.