Home  >  Article  >  Operation and Maintenance  >  How to create multiple files at the same time in a directory in linux

How to create multiple files at the same time in a directory in linux

PHP中文网
PHP中文网Original
2017-06-22 15:46:0012394browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn