Sunday, 23 October 2016

Creating multiple files of particular extension in one line command.

·        To create and empty file we use command touch and filename.
Eg: touch filename1
Will create an blank filename1
·        In order to create multiple files use below command
touch filename{range}.extension
Eg: touch spl{001..100}.bad
·        Here .bad is extension and bspl is name and 001-100 is range.
·        It will create spl001.bad, spl002.bad…spl100.bad
·        $ pwd
/home/ flash /enemy/bad
·        $ ll
total 0
·        $ touch spl{001..100}.bad
·        $ ll| wc -l
101

No comments:

Post a Comment