1.使用timedatectl查看时间状态,并修改时区:
[root@rhcsa test]# timedatectl
[root@rhcsa test]# timedatectl set-timezone "America/New_York"
2.使用wget命令下载一个视频:
[root@rhcsa ~]# wget https://video.pearvideo.com/mp4/adshort/20220317/cont-1755372-15845298_adpkg-ad_hd.mp4
--2022-03-24 20:39:47-- https://video.pearvideo.com/mp4/adshort/20220317/cont-1755372-15845298_adpkg-ad_hd.mp4
Resolving video.pearvideo.com (video.pearvideo.com)... 221.229.203.204, 221.229.203.201, 221.229.203.207, ...
Connecting to video.pearvideo.com (video.pearvideo.com)|221.229.203.204|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12364433 (12M) [video/mp4]
Saving to: ‘cont-1755372-15845298_adpkg-ad_hd.mp4.2’
cont-1755372-15845298_adpkg 100%[===========================================>] 11.79M 30.5KB/s in 3m 3s
2022-03-24 20:42:50 (65.9 KB/s) - ‘cont-1755372-15845298_adpkg-ad_hd.mp4.2’ saved [12364433/12364433]
[root@rhcsa ~]#
3.Linux中的文件类型及符号表示:
1.普通文件:-
2.目录文件:d
3.链接文件:l
4.设备文件:c
5.管道文件:p
6.套接字文件:s
4. 创建和查看目录文件
创建:
[root@rhcsa ~]# mkdir test
[root@rhcsa ~]# cd test
[root@rhcsa test]# mkdir -pv /root/test5/test55/test555
mkdir: 已创建目录 '/root/test5'
mkdir: 已创建目录 '/root/test5/test55'
mkdir: 已创建目录 '/root/test5/test55/test555'
[root@rhcsa test]# mkdir -pv /root/test{6,7,8} (在root下创建test6,test7,test8)
mkdir: 已创建目录 '/root/test6'
mkdir: 已创建目录 '/root/test7'
mkdir: 已创建目录 '/root/test8'
[root@rhcsa test]# mkdir -p test3/file1(在test3下创建file1)
[root@rhcsa test]# touch file1
[root@rhcsa test]# touch file1 -d 20220319(修改file1的时间)
[root@rhcsa test]# stat file1(查看file1的详细信息)
File: file1
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: fd00h/64768d Inode: 34347550 Links: 1
Access: (0644/-rw-r--r--) 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-25 20:31:07.973132249 +0800
Birth: -
查看cat、head,tail,less :
[root@rhcsa test]# cat test3/file1
[root@rhcsa test]# head test3/file1
[root@rhcsa test]# tail test3/file1
[root@rhcsa test]# less test3/file1
删除文件:
[root@rhcsa test]# rm -r test3/file1