目录
1、查看所有时区的时间状态列出所有已知时区并修改其中任意一个
4、创建目录test,并使用一条命令在test下创建 test1/test2/test3
b.在上面创建的test3目录下创建 file1 并修改文件的修改时间为 20220319
1、查看所有时区的时间状态列出所有已知时区并修改其中任意一个
[root@Gur ~]# timedatectl status
Local time: Sun 2022-03-20 17:45:48 CST
Universal time: Sun 2022-03-20 09:45:48 UTC
RTC time: Sun 2022-03-20 09:45:48
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: no
NTP service: inactive
RTC in local TZ: no
[root@Gur test3]# timedatectl set-timezone America/New_York
[root@Gur test3]# timedatectl
Local time: Sun 2022-03-20 06:36:00 EDT
Universal time: Sun 2022-03-20 10:36:00 UTC
RTC time: Sun 2022-03-20 10:36:01
Time zone: America/New_York (EDT, -0400)
System clock synchronized: no
NTP service: inactive
RTC in local TZ: no
2、熟悉使用wget命令下载一个视频
[root@Gur ~]# wget https://www.pearvideo.com/video_1750965
--2022-03-20 17:41:43-- https://www.pearvideo.com/video_1750965
Resolving www.pearvideo.com (www.pearvideo.com)... 203.107.47.49
Connecting to www.pearvideo.com (www.pearvideo.com)|203.107.47.49|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘video_1750965’
video_1750965 [ <=> ] 35.05K --.-KB/s in 0.09s
2022-03-20 17:41:44 (393 KB/s) - ‘video_1750965’ saved [35891]
[root@Gur ~]# ls
anaconda-ks.cfg Downloads index.html.1 parent Templates
Desktop exit initial-setup-ks.cfg Pictures video_1750965
Documents index.html Music Public Videos
3、Linux中的文件类型以及符号的表示
-
普通文件:一个普通的文件:视频,音频,文本等等
-
目录文件: 指目录
-
链接文件:符号链接,用于不同目录下的文件共享, 指向另一个文件
-
设备文件:块设备:就是我们的磁盘 / 字符设备:按照字符进行操作的终端 tty, 键盘
-
管道文件:主要用于进程间数据的传递
-
套接字文件:主要应用于网络数据连接
-
d:目录文件 -:普通文件 l:链接文件 b:块设备文件
-
c:字符设备文件 p:管道文件 s:套接字文件
4、创建目录test,并使用一条命令在test下创建 test1/test2/test3
[root@Gur ~]# mkdir test
[root@Gur ~]# cd test
[root@Gur test]# mkdir -p test1/test2/test3
a.输出test3的完整路径
[root@Gur ~]# ls -R
test3
./test/test1/test2/test3:
b.在上面创建的test3目录下创建 file1 并修改文件的修改时间为 20220319
[root@Gur test3]# mkdir file1
[root@Gur test3]# touch -d 20220319 file1
[root@Gur test3]# ls -l
total 0
drwxr-xr-x. 2 root root 6 Mar 19 00:00 file1
c.查看file1的详细信息
[root@Gur test3]# stat file1
File: file1
Size: 6 Blocks: 0 IO Block: 4096 directory
Device: fd03h/64771d Inode: 31783511 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Context: unconfined_u:object_r:admin_home_t:s0
Access: 2022-03-19 00:00:00.000000000 +0800
Modify: 2022-03-19 00:00:00.000000000 +0800
Change: 2022-03-20 18:25:33.192380085 +0800
Birth: 2022-03-20 18:07:12.712446157 +0800