创建目录和文件
mkdir
[root@linuxcool ~]# mkdir Dir1
[root@linuxcool ~]# mkdir -m 700 Dir2
[root@linuxcool ~]# mkdir Dir3 Dir4 Dir5
[root@linuxcool ~]# mkdir -p /Dir{01..10}/{www,bbs,blog}
[root@linuxcool ~]# tree /Dir..
[root@linuxcool ~]# ls -R /Dir..
touch
[root@linuxcool ~]# touch File.txt
[root@linuxcool ~]# touch File{1..5}.txt
访问数据
修改时间(
变化时间(
[root@linuxcool ~]# touch -m time.txt
[root@linuxcool ~]# touch -a time.txt
[root@linuxcool ~]# touch -t 202110240606 yu.txt #touch -t 修改文件的时间,这个文件的时间就被修改为 2021-10-24 06:06
[root@linuxcool ~]# ls -l --full-time 进行查看详细时间
[root@linuxcool ~]# stat yu.txt
File: yu.txt
Size: 1256 Blocks: 8 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 35319937 Links: 1
Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root)
Context: system_u:object_r:admin_home_t:s0
Access: 2023-05-18 15:44:00.000000000 +0800
Modify: 2023-05-18 15:44:00.000000000 +0800
Change: 2023-05-06 15:43:47.843170709 +0800
[root@linuxcool ~]# touch -c test.txt
[root@linuxcool ~]# touch -d "2023-05-18 15:44" File.cfg
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 25岁的心里话
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现