The touch of the shell command creates a file

1. Create a single file

touch file.*

file.* indicates a certain type of file (eg: file.txt, file.cfg, file.ini, file.db, file.dat, file.xml, etc.);

In the current directory, create file.* files;

Note: You can not specify the file type, that is, do not add the file suffix, such as:

touch file

In the current directory, create a file file;

2. Create multiple files

touch file1.* file2.* file3.*

file.* indicates a certain type of file (eg: file.txt, file.cfg, file.ini, file.db, file.dat, file.xml, etc.);

In the current directory, create file1.*, file2.*, file3.* files;

Note: The files created are all new empty files;

Guess you like

Origin blog.csdn.net/weixin_44498669/article/details/130009085