I am executing touch command in a for loop to create empty file. What I am going to do here is reading files from a particular folder and creating empty files with an additional extension to the original file names. Your empty files may contain addition extension otherwise you may loose data in the original files. It is always simple to execute a command like touch to create a single empty file, but when you need to create a list of empty files then probably you want to execute the same command through loop.Įven a situation may occur, where you need to create empty files for a list of files in a folder then you need to read those files to create corresponding empty files. To create an empty file generally you may use touch command in Unix shell terminal. You may need to create empty files for a list of corresponding files in a directory or folder. In this example I will show you how to create empty files for files in Unix or Linux based systems.
0 Comments
Leave a Reply. |