How to create multiple empty files at a time in Linux

touch command is used to create a empty file.

Syntax:

$ touch <file name>

To create multiple empty file we can use below command.

  • To create 1 to 100 files

$ touch testfile{1..100}.txt

  • To create a to z files

$ touch testfile{a..z}.txt

  • To create a 100 to 1 file with decrements of 2

$ touch testfile{100..1..2}

Happy Learning…

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: