touch: add Simplified Chinese Translation (#12786)

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
This commit is contained in:
Smart-SangGe 2024-05-22 00:07:36 +08:00 committed by GitHub
parent d43c76d81c
commit f00b073f41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

20
pages.zh/common/touch.md Normal file
View File

@ -0,0 +1,20 @@
# touch
> 创建文件并设置访问/修改时间。
> 更多信息:<https://manned.org/man/freebsd-13.1/touch>.
- 创建指定的文件:
`touch {{路径/到/文件名1 路径/到/文件名2 ...}}`
- 将文件的访问(a)或修改时间(m)设置为当前时间,如果文件不存在则不创建(-c)
`touch -c -{{a|m}} {{路径/到/文件1 路径/到/文件2 ...}}`
- 将文件时间(-t)设置为指定值,如果文件不存在则不创建(-c)
`touch -c -t {{YYYYMMDDHHMM.SS}} {{路径/到/文件名1 路径/到/文件名2 ...}}`
- 将文件时间设置为另一文件(-r,即文件3)的时间,如果文件不存在则不创建(-c)
`touch -c -r {{路径/到/文件3}} {{路径/到/文件名1 路径/到/文件名2 ...}}`