Can touch create multiple files?

QuestionsQuestions8 SkillsProBasic Files OperationsAug, 04 2025
0406

Yes, the touch command can create multiple files simultaneously. You can specify multiple file names in a single command. For example:

touch file1.txt file2.txt file3.txt

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

You can also use pattern expansion to create files with sequential names, like this:

touch document_{1..5}.txt

This will create five files named document_1.txt, document_2.txt, up to document_5.txt.

0 Comments

no data
Be the first to share your comment!