How to create multiple files?

QuestionsQuestions8 SkillsProBasic Files OperationsAug, 16 2025
0181

You can create multiple files simultaneously using the touch command by listing the file names separated by spaces. Here’s an example:

touch file1.txt file2.txt file3.txt

This command will create three empty files: file1.txt, file2.txt, and file3.txt.

Alternatively, you can use pattern expansion to create files with sequential names:

touch document_{1..5}.txt

This command will create five files named document_1.txt, document_2.txt, document_3.txt, document_4.txt, and document_5.txt.

0 Comments

no data
Be the first to share your comment!