To create multiple files in the same directory at the same time under Linux, you can use the touch command. The following command is used to create three files named filename1, filename2 and filename3 in the current directory:
touch filename1 filename2 filename3
touch command description:
1. Command format: touch [option]... file...
2. Command parameters:
-a or --time=atime or --time=access or --time=use Only change the access time.
-c or --no-create Do not create any documents.
-d Use the specified date and time instead of the current time.
-f This parameter will be ignored and will not be processed. It is only responsible for solving the compatibility problem of the BSD version of the touch command.
-m or --time=mtime or --time=modify Only change the change time.
-r Set the date and time of the specified document or directory to be the same as the date and time of the reference document or directory.
-t Use the specified date and time instead of the current time.
3. Command function: The touch command parameters can change the date and time of the document or directory, including access time and change time.
The above is the detailed content of How to create multiple files at the same time in a directory in linux. For more information, please follow other related articles on the PHP Chinese website!