How To Create File In Linux with Different Ways?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-create-file-in-linux-with-different-ways/
PINTEREST
PINTEREST
INSTAGRAM

Sometimes creating a file empty or with a little content can be important. In this post we will look how to create a file from command line interface. Here is alternative ways to create files.

Touch

Touch command is the first choice for creating empty file with the current user ownership.

Touch
Touch

Echo

Echo command is very useful command to put string into the standard output. I we redirect our output to a file new file will be created.

Echo
Echo

We can provide some text data to put into newly created file.

Cat

Cat is a command especially created for concatenate files and print on the standard output.

Cat
Cat

After putting command we should press CTRL+d to exit from input mode.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-create-file-in-linux-with-different-ways/
PINTEREST
PINTEREST
INSTAGRAM