RHCSA DAY2

1.使用timedatectl查看时间状态

[root@RHCSA ~]# timedatectl
               Local time: Sun 2022-03-20 20:10:05 CST
           Universal time: Sun 2022-03-20 12:10:05 UTC
                 RTC time: Sun 2022-03-20 12:10:09
                Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: no


  列出所有已知时区

[root@RHCSA ~]# timedatectl list-timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Bamako
Africa/Bangui
Africa/Banjul

  修改时区为列出时区的某一个

[root@RHCSA ~]# timedatectl set-timezone "America/New_York"
[root@RHCSA ~]# timedatectl
               Local time: Sun 2022-03-20 08:24:51 EDT
           Universal time: Sun 2022-03-20 12:24:51 UTC
                 RTC time: Sun 2022-03-20 12:24:55
                Time zone: America/New_York (EDT, -0400)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: no

2.使用wget命令在https://www.pearvideo.com/这个网站下载任意一个视频

[root@RHCSA ~]# wget https://video.pearvideo.com/mp4/adshort/20220317/cont-1755372-15845298_adpkg-ad_hd.mp4
--2022-03-20 19:18:40--  https://video.pearvideo.com/mp4/adshort/20220317/cont-1755372-15845298_adpkg-ad_hd.mp4
Resolving video.pearvideo.com (video.pearvideo.com)... 150.138.39.199, 150.138.39.200, 150.138.39.201, ...
Connecting to video.pearvideo.com (video.pearvideo.com)|150.138.39.199|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12364433 (12M) [video/mp4]
Saving to: ‘cont-1755372-15845298_adpkg-ad_hd.mp4’

cont-1755372-158452 100%[===================>]  11.79M   195KB/s    in 2m 59s  

2022-03-20 19:21:40 (67.4 KB/s) - ‘cont-1755372-15845298_adpkg-ad_hd.mp4’ saved [12364433/12364433]

3.Linux中的文件类型以及符号的表示

[root@RHCSA ~]# ls -l
total 12092
-rw-------. 1 root root     1724 Mar 18 23:06 anaconda-ks.cfg
-rw-r--r--. 1 root root     2381 Mar 20 07:30 baidu.html
-rw-r--r--. 1 root root 12364433 Mar 17 07:55 cont-1755372-15845298_adpkg-ad_hd.mp4
drwxr-xr-x. 2 root root        6 Mar 18 23:26 Desktop
drwxr-xr-x. 2 root root        6 Mar 18 23:26 Documents
drwxr-xr-x. 2 root root        6 Mar 18 23:26 Downloads
-rw-r--r--. 1 root root     2381 Mar 20 07:04 index.html
-rw-r--r--. 1 root root     1879 Mar 18 23:07 initial-setup-ks.cfg
drwxr-xr-x. 2 root root        6 Mar 18 23:26 Music
drwxr-xr-x. 3 root root       17 Mar 20 04:40 parent
#只看第一个字母

d:目录文件

-:普通文件

l:link 链接文件

b:block块 块设备文件

c:character:字符。字符设备文件

#p:pipe:管道,管道文件

s:socket:套接字,套接字文件

4.创建目录test,并使用一条命令在test下创建 test1/test2/test3

[root@RHCSA ~]# mkdir test
[root@RHCSA ~]# cd test
[root@RHCSA test]# mkdir -p test1/test2/test3

  a.输出test3的完整路径

[root@RHCSA ~]# cd test

[root@RHCSA test]# cd test1
[root@RHCSA test1]# cd test2
[root@RHCSA test2]# cd test3

  b.在上面创建的test3目录下创建 file1 并修改文件的修改时间为 20220319

[root@RHCSA ~]# touch -d 20220319 file1

c.查看file1的详细信息


[root@RHCSA ~]# stat file1
  File: file1
  Size: 0             Blocks: 0          IO Block: 4096   regular empty file
Device: fd00h/64768d    Inode: 51278358    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 -0400
Modify: 2022-03-19 00:00:00.000000000 -0400
Change: 2022-03-20 09:18:16.278563460 -0400
 Birth: -

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Fish_1112

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值