How do you create a file and write to it in Linux?

Thành Đạt

New member
How do you create a file and write to it in Linux?
Answer
How to create a text file on Linux:
  1. Using touch to create a text file: $ touch NewFile.txt.
  2. Using cat to create a new file: $ cat NewFile.txt. …
  3. Simply using > to create a text file: $ > NewFile.txt.
  4. Lastly, we can use any text editor name and then create the file, such as:
 

Tìm kiếm

Back
Top