Linux下touch命令的用法
Touch Command Options
a, change the access time only
-c, if the file does not exist, do not create it
-d, update the access and modification times
-m, change the modification time only
-r, use the access and modification times of file
-t, creates a file using a specified time
1.建立一個新的空檔案
# touch sheena
2.建立多個檔案
# touch sheena meena leena
3.只修改access time為現在的時間,-a
# touch -a leena
4.只修改modification time為現在的時間,-m
# touch -m leena
5.如果檔案不存在,避免建立新檔案,-c
# touch -c leena
6.同時精確設定access and modification times,-t
# touch -c -t YYDDHHMM leena
sets the access and modification date and time to a file leena as 17:30 (17:30 p.m.) December 10 of the current year (2012).
# touch -c -t 12101730 leena
7.使用另一個指定文件的access and modifications times設定檔案的時間戳,-r
# touch -r leena meena
8.建立一個新檔案並指定精確的access and modifications times
# touch -t YYMMDDHHMM.SS tecmint
# touch -t 201212101830.55 tecmint
相關文章
- Linux touch命令Linux
- 在 Linux 下 9 個有用的 touch 命令示例Linux
- Linux下crontab命令的用法Linux
- Linux下echo命令的用法Linux
- Linux下umask命令的用法Linux
- linux命令之touchLinux
- Linux下history命令用法Linux
- linux下date命令用法Linux
- linux每日命令(10):touch命令Linux
- Linux下find命令的用法(轉)Linux
- Linux——基礎命令用法(下)Linux
- 玩轉linux命令(8):touch命令Linux
- Linux基礎命令---touchLinux
- Linux基礎命令—touchLinux
- linux命令下jq的用法簡介Linux
- Linux下more命令高階用法Linux
- Linux下mv命令高階用法Linux
- linux下xargs命令用法詳解Linux
- LINUX下RPM命令基本用法Linux
- Linux下crontab命令的用法:sudo crontab -lLinux
- 每天一個 Linux 命令(9):touch 命令Linux
- 每天一個linux命令(9):touch 命令Linux
- Linux下 ls 命令的高階用法8例Linux
- linux下grep命令用法例項教程Linux
- linux 的xargs命令用法Linux
- Linux 命令“ls ” 的用法Linux
- Linux下RPM 命令用法中文簡介Linux
- linux的nohup命令的用法。Linux
- Linux 下使用 killall 命令終止程式的 8 大用法Linux
- linux下find(檔案查詢)命令的用法總結Linux
- linux之touch命令修改檔案的時間戳Linux時間戳
- linux 中 date命令的用法Linux
- Linux sed命令用法Linux
- linux du命令用法Linux
- Linux 命令 indent 用法Linux
- linux下 date的用法Linux
- Linux 下的 vi 用法Linux
- Linux下scp的用法Linux