bash create file command

#Introduction

In this tutorial, How to use Bash create file command terminal?

How to use Bash to create a file command terminal

use the touch command to create an empty text file with foo.txt

$ touch foo.bar
$ > foo.bar
bash create file command

To make a text file using the cat command line on Linux. press ctrl+c to quit and save the file.

$ cat > foo.txt
How to use Bash to create a file command terminal

shell command

$ echo 'This is my blog: devopsroles.com' > foo.txt

Append text to an existing file

$ echo 'yet another line: huuphan.com' >> foo.txt
Append text to an existing file

You can use the vi/vim command to create the text file.

Conclusion

You have to use the Bash create file command terminal. I hope will this your helpful. Thank you for reading the DevopsRoles page!

,

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created DevopsRoles.com site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.