Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create Multiple Files using Linux Touch Command
#1

  Create Multiple Files using Linux Touch Command
 

Create Multiple Files using Linux Touch Command


 

It is also possible to create multiple files using a single touch command. To do that, specify the names of the files with spaces between them. It would look like this in the command line:

 
touch file_name1.txt file_name2.txt file_name3.txt
  Screenshot of creating multiple files with touch command
 

You can auto-generate file names using curl braces while creating multiple files, like in the following example:

 
touch file_name{1..3}.txt
 

The above touch command will create three files named file_name1.txt, file_name2.txt, and file_name3.txt.

 

 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)