一、文件基本信息
时间类型、
查看文件时间
[root@localhost ~]# stat /etc/passwd(文件名)
访问时间:atime
修改时间(修改文件内容):mtime
改变时间(修改文件属性):ctime
二、其他命令扩展
下载网站源码,获取数据:curl 网址
(下载阿里云yum源镜像实例)
-o 指定下载路径
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
下载网络资源,下载软件:wget 网址
-O 指定下载路径
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
查看命令存储位置
which/where
[root@localhost ~]# whereis pwd
pwd: /usr/bin/pwd /usr/share/man/man1/pwd.1.gz
[root@localhost ~]# which pwd
/usr/bin/pwd
查看当前登录用户
w/who/
[root@localhost ~]# w
11:32:14 up 2:12, 2 users, load average: 0.00, 0.01, 0.05
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root tty1 09:20 2:08m 0.01s 0.01s -bash
root pts/0 10.36.192.12 11:15 6.00s 0.04s 0.01s w
[root@localhost ~]# who
root tty1 2023-10-21 09:20
root pts/0 2023-10-21 11:15 (10.36.192.12)
上传和下载(需要安装工具)
sz(下载)
rz(上传)
[root@localhost ~]# yum -y install lrzsz
[root@localhost ~]#rz
[root@localhost ~]#sz 文件名