Linux基础命令

目录

1、查看所有时区的时间状态列出所有已知时区并修改其中任意一个

2、熟悉使用wget命令下载一个视频

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

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

  a.输出test3的完整路径

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

 c.查看file1的详细信息


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中的文件类型以及符号的表示

  1. 普通文件:一个普通的文件:视频,音频,文本等等

  2. 目录文件: 指目录

  3. 链接文件:符号链接,用于不同目录下的文件共享, 指向另一个文件

  4. 设备文件:块设备:就是我们的磁盘 / 字符设备:按照字符进行操作的终端 tty, 键盘

  5. 管道文件:主要用于进程间数据的传递

  6. 套接字文件:主要应用于网络数据连接

  7. d:目录文件     -:普通文件     l:链接文件     b:块设备文件     

  8. 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

Gur.

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

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

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

打赏作者

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

抵扣说明:

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

余额充值