中文字幕亚洲第一精品|精品国产免费一区二区|久久婷婷五月六月综合版|中文字幕熟妇久久久人妻|久久综合精品国产一区无码|国产成人精品永久免费视频|午夜亚洲国产精品理论片a级|久久精品一区二区三区无码护土

 訪問手機版  

Linux常用命令|Linux培訓學習|考試認證|工資待遇與招聘,認準超級網(wǎng)工!

招聘|合作 登陸|注冊

網(wǎng)絡工程師培訓

當前位置:網(wǎng)絡工程師 > 技術課程 > linux > 熱點關注 > linux常用命令

Linux touch命令詳解

時間:2019-08-29

linux命令大全_linux命令大全進程_linux命令大全 root

touch命令有兩個功能:

一是用于把已存在文件的時間標簽更新為系統(tǒng)當前的時間(默認方式),它們的數(shù)據(jù)將原封不動地保留下來;

linux命令大全 root_linux命令大全進程_linux命令大全

二是用來創(chuàng)建新的空文件。

-a                     change only the access time
-c, --no-create        do not create any files
-d, --date=STRING      parse STRING and use it instead of current time
-f                     (ignored)
-h, --no-dereference   affect each symbolic link instead of any referenced
                       file (useful only on systems that can change the
                       timestamps of a symlink)
-m                     change only the modification time
-r, --reference=FILE   use this file's times instead of current time
-t STAMP               use [[CC]YY]MMDDhhmm[.ss] instead of current time
--time=WORD            change the specified time:
                         WORD is access, atime, or use: equivalent to -a
                         WORD is modify or mtime: equivalent to -m
    --help     display this help and exit
    --version  output version information and exit

linux命令大全進程_linux命令大全_linux命令大全 root

touch:創(chuàng)建file1—file10共10個文件

touch file{1..10}

設定文件的時間戳

touch%20-t%20201810121230%20hh.sh%20【-t用十進制數(shù)】

image

更新log.log的時間和log2012.log時間戳相同

touch -r hh hh.sh    【touch -r目標文件  源文件】
 上一個教程:vi/vim常用命令介紹