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