Linux Today: Linux News On Internet Time.

More on LinuxToday

12 examples to use flower brackets in Linux

Feb 22, 2016, 06:00 (0 Talkback[s])
(Other stories by Surendra Kumar)

This is a small post on how to create 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..

Complete Story