February 19, 2016

12 examples to use flower brackets in Linux

This is a small post on how to crate multiple files/folders, sequence generation with flower brackets in-order to save valuable time.

Creating empty files can be done with touch command. We will see how to create multiple files using this command in one shot.

Example 1: Create a file with name abc.txt

touch abc.txt

Example2: Create multiple files abc, cde, efg, hij, klm

touch  abc cde efg hij klm

Example 3: How about creating 1 to 20 files, ie creating multiple files with one command. Its bit tedious job for an admin. Donât worry Linux provide us with some useful option with âFlower bracesâ to do expansion. Instead of writing below command

touch 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

We can create 20 files using flower brace {} expansion as shown below..

Read Full Post: http://www.linuxnix.com/12-examples-flower-brackets-linux/

Click Here!