linux touch命令 创建文件


 

 

touch 创建文件,用法,touch test.txt,如果文件存在,则表示修改当前文件时间

[root@MongoDB ~]# touch /data/text.txt
[root@MongoDB ~]# ls /data/
text.txt

 

[root@MongoDB ~]# touch text.txt
[root@MongoDB ~]# ls
anaconda-ks.cfg  text.txt
 

 

touch file{1..3}.txt 创建3个文件

[root@MongoDB ~]# touch file{1..3}.txt
[root@MongoDB ~]# ll
total 4
-rw-------. 1 root root 1851 Mar 27 08:38 anaconda-ks.cfg
-rw-r--r--  1 root root    0 May 18 07:41 file1.txt
-rw-r--r--  1 root root    0 May 18 07:41 file2.txt
-rw-r--r--  1 root root    0 May 18 07:41 file3.txt

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM