【课程笔记】快速上手Linux玩转典型应用——慕课网(Linux常用命令)

标签(空格分隔): Linux运维 学习笔记


1、软件操作命令:

  • yum——软件包管理器
  • yum clean packages

2、服务器硬件资源、硬盘操作

  • 内存:free -m
  • 硬盘:df -h
  • 负载:w/top (运维常用,检查负载)
    Load average——平均负载;
    top动态改变,按住Q可以推出。
    load:1min,5min,average——健康程度
    标准:0.6,0.7
  • CPU个数、核数
    cat /proc/cpuinfo
  • 格式化磁盘
    fdisk命令

3、文件和文件夹操作命令

  • Linux文件目录结构
    根目录/
    家目录/home;~/home(当前用户)
    临时目录/tmp
    配置目录/etc
    用户程序目录/usr
    Linux的文件结构本质上就是一个树形结构;

  • 文件的基本操作
    ls:查看目录下面的文件
    touch:新建文件
    mkdir:新建目录
    cd:进入目录
    rm:删除文件、目录
    cp:复制
    mv:移动
    pwd:显示当前所在路径

  • 文本编辑器Vim
    Vim神教教学:
    服务器上是没有GUI界面,而且Vim是一种神教,会了就是大牛;
    yum install vim;
    Vim菜鸟教程,学就完事了。
    进入插入模式:i
    推出模式:escape
    行首行尾:gg行首;G行尾
    删除一行:dd
    恢复:u
    复制行:p
    推出保存:wq

  • 文件权限421、777
    文件权限的组成:rwx(2进制421)
    -rw——–= 600
    配置环境的时候会遇到权限的问题,一般操作是暴力赋予777满权限,但是这个不是正确的。
    读:4
    写:4+2
    执行:4+2+1

  • 文件搜索、查找、读取
    文件的搜索:
    tail:从文件的尾部开始读;
    head:从文件的头部开始读;
    cat:读取整个文件;
    more:分页读取;
    less:可控分页;
    grep:搜索关键字;
    find:查找文件;
    wc:统计个数;

    查找:Runoob linux命令都可以学习;
    读取:

  • 文件压缩、解压
    为了减小容量的限制,采用解压缩方便传输,主要采用tar命令进行压缩文件。

4、系统用户操作命令

  • useradd 添加用户
  • adduser 添加用户
  • userdel 删除用户
  • passwd 设置密码

5、防火墙相关设置
作用:保护服务器安全。主要通过设置防火墙的规则开放80,22,443端口;
对于商业的服务器,不可以关闭防火墙。只会指定开放部分端口,但是没有多少漏洞可以使用。
- 段时间关闭 sudo service firewall

6、提取操作SUDO和文件传输操作

  • 提权:sudo;visudo
  • 文件下载:wget;curl
  • 文件上传:scp
    线上运行服务器的时候,不使用root账号进行操作,还是只能使用原来的账号。
    文件的下载:见具体命令行
    本地文件上传:Xshell进行上传本地文件

scp命令是可以连接到服务器
scp filename username@domain:directory


Last login: Tue Apr 17 16:14:49 on ttys000
zhangyunchendeMacBook-Pro:~ zhangyunchen$ ssh root@192.168.0.114
root@192.168.0.114's password: 
Last login: Tue Apr 17 08:10:20 2018
[root@localhost ~]# yum install vim
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
软件包 2:vim-enhanced-7.4.160-2.el7.x86_64 已安装并且是最新版本
无须任何处理
[root@localhost ~]# yum clean packages
已加载插件:fastestmirror
正在清理软件源: base extras updates
0 package 文件已移除
[root@localhost ~]#  free -m
              total        used        free      shared  buff/cache   available
Mem:            992          97         711           6         183         734
Swap:          2047           0        2047
[root@localhost ~]# df -h
文件系统             容量  已用  可用 已用% 挂载点
/dev/mapper/cl-root   27G  1.3G   26G    5% /
devtmpfs             486M     0  486M    0% /dev
tmpfs                497M     0  497M    0% /dev/shm
tmpfs                497M  6.6M  490M    2% /run
tmpfs                497M     0  497M    0% /sys/fs/cgroup
/dev/sda1           1014M  138M  877M   14% /boot
tmpfs                100M     0  100M    0% /run/user/0
[root@localhost ~]# w
 08:12:57 up 2 min,  2 users,  load average: 0.12, 0.12, 0.05
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
root     tty1                      08:10    2:25   0.02s  0.02s -bash
root     pts/0    192.168.0.155    08:11    1.00s  0.03s  0.02s w
[root@localhost ~]# top

top - 08:13:13 up 3 min,  2 users,  load average: 0.09, 0.11, 0.05
Tasks:  91 total,   1 running,  90 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.8 sy,  0.0 ni, 99.2 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :  1016476 total,   728104 free,    99884 used,   188488 buff/cache
KiB Swap:  2097148 total,  2097148 free,        0 used.   752468 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND     
    1 root      20   0  128092   6700   3948 S  0.0  0.7   0:01.05 systemd     
    2 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kthreadd    
    3 root      20   0       0      0      0 S  0.0  0.0   0:00.03 ksoftirqd/0 
    4 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0 
    5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H
    6 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kworker/u2:0
    7 root      rt   0       0      0      0 S  0.0  0.0   0:00.00 migration/0 
    8 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcu_bh      
    9 root      20   0       0      0      0 S  0.0  0.0   0:00.40 rcu_sched   
   10 root      rt   0       0      0      0 S  0.0  0.0   0:00.00 watchdog/0  
   12 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 khelper     
   13 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kdevtmpfs   
   14 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 netns       
   15 root      20   0       0      0      0 S  0.0  0.0   0:00.00 khungtaskd  
   16 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 writeback   
   17 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kintegrityd 
   18 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 bioset      ˀ
[1]+  已停止               top
[root@localhost ~]# cat /proc/cpuinfo 
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 94
model name  : Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
stepping    : 3
cpu MHz     : 2712.000
cache size  : 8192 KB
physical id : 0
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 22
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq monitor ssse3 cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase avx2 invpcid rdseed clflushopt
bogomips    : 5424.00
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

[root@localhost ~]# fdisk
用法:
 fdisk [选项] <磁盘>    更改分区表
 fdisk [选项] -l <磁盘> 列出分区表
 fdisk -s <分区>        给出分区大小(块数)

选项:
 -b <大小>             扇区大小(512102420484096)
 -c[=<模式>]           兼容模式:“dos”或“nondos”(默认)
 -h                    打印此帮助文本
 -u[=<单位>]           显示单位:“cylinders”(柱面)或“sectors”(扇区,默认)
 -v                    打印程序版本
 -C <数字>             指定柱面数
 -H <数字>             指定磁头数
 -S <数字>             指定每个磁道的扇区数

[root@localhost ~]# cd /
[root@localhost /]# ls
bin   dev  home  lib64  mnt  proc  run   srv  tmp  var
boot  etc  lib   media  opt  root  sbin  sys  usr
[root@localhost /]# ls -al
总用量 16
dr-xr-xr-x.  17 root root  224 416 06:26 .
dr-xr-xr-x.  17 root root  224 416 06:26 ..
lrwxrwxrwx.   1 root root    7 416 06:22 bin -> usr/bin
dr-xr-xr-x.   4 root root 4096 416 06:29 boot
drwxr-xr-x.  19 root root 3020 417 08:10 dev
drwxr-xr-x.  76 root root 8192 417 08:10 etc
drwxr-xr-x.   2 root root    6 115 2016 home
lrwxrwxrwx.   1 root root    7 416 06:22 lib -> usr/lib
lrwxrwxrwx.   1 root root    9 416 06:22 lib64 -> usr/lib64
drwxr-xr-x.   2 root root    6 115 2016 media
drwxr-xr-x.   2 root root    6 115 2016 mnt
drwxr-xr-x.   2 root root    6 115 2016 opt
dr-xr-xr-x. 100 root root    0 417 08:10 proc
dr-xr-x---.   2 root root  151 4月  16 07:48 root
drwxr-xr-x.  22 root root  680 417 08:11 run
lrwxrwxrwx.   1 root root    8 416 06:22 sbin -> usr/sbin
drwxr-xr-x.   2 root root    6 115 2016 srv
dr-xr-xr-x.  13 root root    0 417 08:10 sys
drwxrwxrwt.   7 root root  132 417 08:10 tmp
drwxr-xr-x.  13 root root  155 416 06:22 usr
drwxr-xr-x.  19 root root  267 417 08:10 var
[root@localhost /]# cd /home
[root@localhost home]# ls -al
总用量 0
drwxr-xr-x.  2 root root   6 115 2016 .
dr-xr-xr-x. 17 root root 224 416 06:26 ..
[root@localhost home]# cd /etc
[root@localhost etc]# ls -al
总用量 1100
drwxr-xr-x. 76 root root     8192 417 08:10 .
dr-xr-xr-x. 17 root root      224 416 06:26 ..
-rw-r--r--.  1 root root       16 4月  16 06:27 adjtime
-rw-r--r--.  1 root root     1518 6月   7 2013 aliases
-rw-r--r--.  1 root root    12288 4月  16 06:28 aliases.db
drwxr-xr-x.  2 root root      236 416 06:23 alternatives
-rw-------.  1 root root      541 3月  31 2016 anacrontab
-rw-r--r--.  1 root root       55 11月  4 2016 asound.conf
drwxr-x---.  3 root root       43 4月  16 06:23 audisp
drwxr-x---.  3 root root       83 4月  16 06:28 audit
drwxr-xr-x.  2 root root       22 416 06:23 bash_completion.d
-rw-r--r--.  1 root root     2853 11月  5 2016 bashrc
drwxr-xr-x.  2 root root        6 116 2016 binfmt.d
-rw-r--r--.  1 root root       38 11月 29 2016 centos-release
-rw-r--r--.  1 root root       51 11月 29 2016 centos-release-upstream
drwxr-xr-x.  2 root root        6 115 2016 chkconfig.d
-rw-r--r--.  1 root root     1165 11月 14 2016 chrony.conf
-rw-r-----.  1 root chrony     62 4月  16 06:28 chrony.keys
drwxr-xr-x.  2 root root       21 416 06:23 cron.d
drwxr-xr-x.  2 root root       42 416 06:23 cron.daily
-rw-------.  1 root root        0 3月  31 2016 cron.deny
drwxr-xr-x.  2 root root       22 69 2014 cron.hourly
drwxr-xr-x.  2 root root        6 69 2014 cron.monthly
-rw-r--r--.  1 root root      451 6月   9 2014 crontab
drwxr-xr-x.  2 root root        6 69 2014 cron.weekly
-rw-------.  1 root root        0 4月  16 06:22 crypttab
-rw-r--r--.  1 root root     1620 11月  5 2016 csh.cshrc
-rw-r--r--.  1 root root      841 6月   7 2013 csh.login
drwxr-xr-x.  4 root root       78 416 06:23 dbus-1
drwxr-xr-x.  2 root root       44 416 06:26 default
drwxr-xr-x.  2 root root       23 416 06:23 depmod.d
drwxr-x---.  3 root root       24 4月  16 06:23 dhcp
-rw-r--r--.  1 root root     5090 11月  4 2016 DIR_COLORS
-rw-r--r--.  1 root root     5725 11月  4 2016 DIR_COLORS.256color
-rw-r--r--.  1 root root     4669 11月  4 2016 DIR_COLORS.lightbgcolor
-rw-r--r--.  1 root root    25213 11月 11 2016 dnsmasq.conf
drwxr-xr-x.  2 root root        6 1111 2016 dnsmasq.d
-rw-r--r--.  1 root root     1285 11月 11 2016 dracut.conf
drwxr-xr-x.  2 root root        6 1111 2016 dracut.conf.d
-rw-r--r--.  1 root root      112 11月  4 2016 e2fsck.conf
-rw-r--r--.  1 root root        0 11月  5 2016 environment
-rw-r--r--.  1 root root     1317 11月  5 2016 ethertypes
-rw-r--r--.  1 root root        0 6月   7 2013 exports
lrwxrwxrwx.  1 root root       56 416 06:22 favicon.png -> /usr/share/icons/hicolor/16x16/apps/fedora-logo-icon.png
-rw-r--r--.  1 root root       70 11月  5 2016 filesystems
drwxr-x---.  5 root root      104 4月  16 06:23 firewalld
-rw-r--r--.  1 root root      465 4月  16 06:22 fstab
drwxr-xr-x.  2 root root        6 512 2015 gcrypt
-rw-r--r--.  1 root root      842 11月  5 2016 GeoIP.conf
-rw-r--r--.  1 root root      858 11月  5 2016 GeoIP.conf.default
drwxr-xr-x.  2 root root        6 115 2016 gnupg
-rw-r--r--.  1 root root       94 4月  29 2015 GREP_COLORS
drwxr-xr-x.  4 root root       40 416 06:22 groff
-rw-r--r--.  1 root root      494 4月  16 06:23 group
-rw-r--r--.  1 root root      480 4月  16 06:23 group-
lrwxrwxrwx.  1 root root       22 416 06:23 grub2.cfg -> ../boot/grub2/grub.cfg
drwx------.  2 root root      182 4月  16 06:26 grub.d
----------.  1 root root      394 4月  16 06:23 gshadow
----------.  1 root root      383 4月  16 06:23 gshadow-
drwxr-xr-x.  3 root root       20 416 06:22 gss
-rw-r--r--.  1 root root        9 6月   7 2013 host.conf
-rw-r--r--.  1 root root       22 4月  16 06:27 hostname
-rw-r--r--.  1 root root      158 6月   7 2013 hosts
-rw-r--r--.  1 root root      370 6月   7 2013 hosts.allow
-rw-r--r--.  1 root root      460 6月   7 2013 hosts.deny
lrwxrwxrwx.  1 root root       11 416 06:22 init.d -> rc.d/init.d
-rw-r--r--.  1 root root      511 11月  5 2016 inittab
-rw-r--r--.  1 root root      942 6月   7 2013 inputrc
drwxr-xr-x.  2 root root      140 416 06:22 iproute2
-rw-r--r--.  1 root root       23 11月 29 2016 issue
-rw-r--r--.  1 root root       22 11月 29 2016 issue.net
-rw-r--r--.  1 root root     6920 4月  16 06:23 kdump.conf
drwxr-xr-x.  3 root root       24 416 06:23 kernel
-rw-r--r--.  1 root root      590 11月  4 2016 krb5.conf
drwxr-xr-x.  2 root root        6 115 2016 krb5.conf.d
-rw-r--r--.  1 root root    19024 4月  16 06:52 ld.so.cache
-rw-r--r--.  1 root root       28 2月  27 2013 ld.so.conf
drwxr-xr-x.  2 root root       74 416 06:23 ld.so.conf.d
-rw-r-----.  1 root root      191 7月  14 2016 libaudit.conf
drwxr-xr-x.  2 root root       35 416 06:22 libnl
-rw-r--r--.  1 root root     2391 10月 12 2013 libuser.conf
-rw-r--r--.  1 root root       19 4月  16 06:27 locale.conf
lrwxrwxrwx.  1 root root       38 416 06:27 localtime -> ../usr/share/zoneinfo/America/New_York
-rw-r--r--.  1 root root     2028 11月  4 2016 login.defs
-rw-r--r--.  1 root root      662 7月  31 2013 logrotate.conf
drwxr-xr-x.  2 root root       78 416 06:23 logrotate.d
drwxr-xr-x.  6 root root      100 416 06:23 lvm
-r--r--r--.  1 root root       33 4月  16 06:23 machine-id
-rw-r--r--.  1 root root      111 11月  5 2016 magic
-rw-r--r--.  1 root root     5122 11月  7 2016 makedumpfile.conf.sample
-rw-r--r--.  1 root root     5171 6月   9 2014 man_db.conf
-rw-r--r--.  1 root root      936 11月  5 2016 mke2fs.conf
drwxr-xr-x.  2 root root       41 416 06:23 modprobe.d
drwxr-xr-x.  2 root root        6 116 2016 modules-load.d
-rw-r--r--.  1 root root        0 6月   7 2013 motd
lrwxrwxrwx.  1 root root       17 416 06:22 mtab -> /proc/self/mounts
-rw-r--r--.  1 root root      570 11月 14 2016 my.cnf
drwxr-xr-x.  2 root root       31 416 06:22 my.cnf.d
drwxr-xr-x.  8 root root      145 416 06:23 NetworkManager
-rw-r--r--.  1 root root       58 11月  5 2016 networks
-rw-r--r--.  1 root root     1728 4月  16 06:27 nsswitch.conf
-rw-r--r--.  1 root root     1726 10月 22 2012 nsswitch.conf.bak
drwxr-xr-x.  3 root root       36 416 06:22 openldap
drwxr-xr-x.  2 root root        6 115 2016 opt
-rw-r--r--.  1 root root      393 11月 29 2016 os-release
drwxr-xr-x.  2 root root     4096 416 06:27 pam.d
-rw-r--r--.  1 root root     1008 4月  16 06:27 passwd
-rw-r--r--.  1 root root     1008 4月  16 06:27 passwd-
drwxr-xr-x.  3 root root       21 416 06:22 pkcs11
drwxr-xr-x.  9 root root       98 416 06:23 pki
drwxr-xr-x.  2 root root       28 416 06:23 plymouth
drwxr-xr-x.  5 root root       52 416 06:22 pm
drwxr-xr-x.  5 root root       72 416 06:23 polkit-1
drwxr-xr-x.  2 root root        6 610 2014 popt.d
drwxr-xr-x.  2 root root      154 416 06:23 postfix
drwxr-xr-x.  3 root root      219 416 06:23 ppp
drwxr-xr-x.  2 root root       78 416 06:23 prelink.conf.d
-rw-r--r--.  1 root root      233 6月   7 2013 printcap
-rw-r--r--.  1 root root     1795 11月  5 2016 profile
drwxr-xr-x.  2 root root      247 416 06:52 profile.d
-rw-r--r--.  1 root root     6545 6月   7 2013 protocols
-rw-------.  1 root root        0 4月  16 06:22 .pwd.lock
drwxr-xr-x.  2 root root       35 416 06:22 python
lrwxrwxrwx.  1 root root       10 416 06:22 rc0.d -> rc.d/rc0.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc1.d -> rc.d/rc1.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc2.d -> rc.d/rc2.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc3.d -> rc.d/rc3.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc4.d -> rc.d/rc4.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc5.d -> rc.d/rc5.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc6.d -> rc.d/rc6.d
drwxr-xr-x. 10 root root      127 416 06:23 rc.d
lrwxrwxrwx.  1 root root       13 416 06:23 rc.local -> rc.d/rc.local
drwxr-xr-x.  2 root root       57 416 06:23 rdma
lrwxrwxrwx.  1 root root       14 416 06:22 redhat-release -> centos-release
-rw-r--r--.  1 root root       74 4月  17 08:10 resolv.conf
-rw-r--r--.  1 root root     1634 12月 24 2012 rpc
drwxr-xr-x.  2 root root       44 416 06:52 rpm
-rw-r--r--.  1 root root     3232 11月  4 2016 rsyslog.conf
drwxr-xr-x.  2 root root       25 115 2016 rsyslog.d
-rw-r--r--.  1 root root      928 11月  5 2016 rwtab
drwxr-xr-x.  2 root root       23 115 2016 rwtab.d
drwxr-xr-x.  2 root root       24 416 06:23 sasl2
-rw-------.  1 root root      221 11月  5 2016 securetty
drwxr-xr-x.  6 root root     4096 416 06:22 security
drwxr-xr-x.  5 root root       81 416 06:23 selinux
-rw-r--r--.  1 root root   670293 6月   7 2013 services
-rw-r--r--.  1 root root      216 11月  7 2016 sestatus.conf
----------.  1 root root      637 4月  16 06:27 shadow
----------.  1 root root      642 4月  16 06:27 shadow-
-rw-r--r--.  1 root root       76 6月   7 2013 shells
drwxr-xr-x.  2 root root       62 416 06:22 skel
drwxr-xr-x.  2 root root      225 416 06:28 ssh
drwxr-xr-x.  2 root root       19 416 06:22 ssl
-rw-r--r--.  1 root root      212 11月  5 2016 statetab
drwxr-xr-x.  2 root root        6 115 2016 statetab.d
-rw-r--r--.  1 root root        0 11月  5 2016 subgid
-rw-r--r--.  1 root root        0 11月  5 2016 subuid
-rw-r-----.  1 root root     1786 11月  4 2016 sudo.conf
-r--r-----.  1 root root     3907 11月  4 2016 sudoers
drwxr-x---.  2 root root        6 11月  5 2016 sudoers.d
-rw-r-----.  1 root root     3181 11月  4 2016 sudo-ldap.conf
drwxr-xr-x.  6 root root     4096 417 08:10 sysconfig
-rw-r--r--.  1 root root      449 11月  5 2016 sysctl.conf
drwxr-xr-x.  2 root root       28 416 06:23 sysctl.d
drwxr-xr-x.  4 root root      151 416 06:23 systemd
lrwxrwxrwx.  1 root root       14 416 06:22 system-release -> centos-release
-rw-r--r--.  1 root root       23 11月 29 2016 system-release-cpe
-rw-------.  1 tss  tss      7046 11月 20 2015 tcsd.conf
drwxr-xr-x.  2 root root        6 610 2014 terminfo
drwxr-xr-x.  2 root root        6 116 2016 tmpfiles.d
drwxr-xr-x.  2 root root       70 416 06:23 tuned
drwxr-xr-x.  3 root root       54 416 06:28 udev
-rw-r--r--.  1 root root      163 4月  16 06:22 .updated
-rw-r--r--.  1 root root       37 4月  16 06:27 vconsole.conf
-rw-r--r--.  1 root root     1982 8月   1 2017 vimrc
-rw-r--r--.  1 root root     1982 6月  10 2014 virc
-rw-r--r--.  1 root root     4479 10月 26 12:50 wgetrc
drwxr-xr-x.  2 root root       33 416 06:23 wpa_supplicant
drwxr-xr-x.  5 root root       57 416 06:23 X11
drwxr-xr-x.  4 root root       38 416 06:23 xdg
drwxr-xr-x.  2 root root        6 115 2016 xinetd.d
drwxr-xr-x.  6 root root      100 416 06:22 yum
-rw-r--r--.  1 root root      970 11月 15 2016 yum.conf
drwxr-xr-x.  2 root root      223 416 07:10 yum.repos.d
[root@localhost etc]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ll
总用量 32
-rw-r--r--. 1 root root 1572 11月 30 2016 CentOS7-Base-163.repo
-rw-r--r--. 1 root root 1664 11月 29 2016 CentOS-Base.repo.backup
-rw-r--r--. 1 root root 1309 11月 29 2016 CentOS-CR.repo
-rw-r--r--. 1 root root  649 11月 29 2016 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  314 11月 29 2016 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630 11月 29 2016 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 11月 29 2016 CentOS-Sources.repo
-rw-r--r--. 1 root root 2893 11月 29 2016 CentOS-Vault.repo
[root@localhost yum.repos.d]# cd /tmp
[root@localhost tmp]# ls -al
总用量 4
drwxrwxrwt.  7 root root 132 417 08:10 .
dr-xr-xr-x. 17 root root 224 416 06:26 ..
drwxrwxrwt.  2 root root   6 416 06:23 .font-unix
drwxrwxrwt.  2 root root   6 416 06:23 .ICE-unix
-rwx------.  1 root root 836 4月  16 06:28 ks-script-At5Czm
drwxrwxrwt.  2 root root   6 416 06:23 .Test-unix
drwxrwxrwt.  2 root root   6 416 06:23 .X11-unix
drwxrwxrwt.  2 root root   6 416 06:23 .XIM-unix
-rw-------.  1 root root   0 4月  16 06:22 yum.log
[root@localhost tmp]# 
[root@localhost tmp]# 
[root@localhost tmp]# 
[root@localhost tmp]# cd
[root@localhost ~]# cd ~
[root@localhost ~]# 
[root@localhost ~]# ls
anaconda-ks.cfg
[root@localhost ~]# cd /etc
[root@localhost etc]# ls
adjtime                  hosts                     rc0.d
aliases                  hosts.allow               rc1.d
aliases.db               hosts.deny                rc2.d
alternatives             init.d                    rc3.d
anacrontab               inittab                   rc4.d
asound.conf              inputrc                   rc5.d
audisp                   iproute2                  rc6.d
audit                    issue                     rc.d
bash_completion.d        issue.net                 rc.local
bashrc                   kdump.conf                rdma
binfmt.d                 kernel                    redhat-release
centos-release           krb5.conf                 resolv.conf
centos-release-upstream  krb5.conf.d               rpc
chkconfig.d              ld.so.cache               rpm
chrony.conf              ld.so.conf                rsyslog.conf
chrony.keys              ld.so.conf.d              rsyslog.d
cron.d                   libaudit.conf             rwtab
cron.daily               libnl                     rwtab.d
cron.deny                libuser.conf              sasl2
cron.hourly              locale.conf               securetty
cron.monthly             localtime                 security
crontab                  login.defs                selinux
cron.weekly              logrotate.conf            services
crypttab                 logrotate.d               sestatus.conf
csh.cshrc                lvm                       shadow
csh.login                machine-id                shadow-
dbus-1                   magic                     shells
default                  makedumpfile.conf.sample  skel
depmod.d                 man_db.conf               ssh
dhcp                     mke2fs.conf               ssl
DIR_COLORS               modprobe.d                statetab
DIR_COLORS.256color      modules-load.d            statetab.d
DIR_COLORS.lightbgcolor  motd                      subgid
dnsmasq.conf             mtab                      subuid
dnsmasq.d                my.cnf                    sudo.conf
dracut.conf              my.cnf.d                  sudoers
dracut.conf.d            NetworkManager            sudoers.d
e2fsck.conf              networks                  sudo-ldap.conf
environment              nsswitch.conf             sysconfig
ethertypes               nsswitch.conf.bak         sysctl.conf
exports                  openldap                  sysctl.d
favicon.png              opt                       systemd
filesystems              os-release                system-release
firewalld                pam.d                     system-release-cpe
fstab                    passwd                    tcsd.conf
gcrypt                   passwd-                   terminfo
GeoIP.conf               pkcs11                    tmpfiles.d
GeoIP.conf.default       pki                       tuned
gnupg                    plymouth                  udev
GREP_COLORS              pm                        vconsole.conf
groff                    polkit-1                  vimrc
group                    popt.d                    virc
group-                   postfix                   wgetrc
grub2.cfg                ppp                       wpa_supplicant
grub.d                   prelink.conf.d            X11
gshadow                  printcap                  xdg
gshadow-                 profile                   xinetd.d
gss                      profile.d                 yum
host.conf                protocols                 yum.conf
hostname                 python                    yum.repos.d
[root@localhost etc]# ls -al
总用量 1100
drwxr-xr-x. 76 root root     8192 417 08:10 .
dr-xr-xr-x. 17 root root      224 416 06:26 ..
-rw-r--r--.  1 root root       16 4月  16 06:27 adjtime
-rw-r--r--.  1 root root     1518 6月   7 2013 aliases
-rw-r--r--.  1 root root    12288 4月  16 06:28 aliases.db
drwxr-xr-x.  2 root root      236 416 06:23 alternatives
-rw-------.  1 root root      541 3月  31 2016 anacrontab
-rw-r--r--.  1 root root       55 11月  4 2016 asound.conf
drwxr-x---.  3 root root       43 4月  16 06:23 audisp
drwxr-x---.  3 root root       83 4月  16 06:28 audit
drwxr-xr-x.  2 root root       22 416 06:23 bash_completion.d
-rw-r--r--.  1 root root     2853 11月  5 2016 bashrc
drwxr-xr-x.  2 root root        6 116 2016 binfmt.d
-rw-r--r--.  1 root root       38 11月 29 2016 centos-release
-rw-r--r--.  1 root root       51 11月 29 2016 centos-release-upstream
drwxr-xr-x.  2 root root        6 115 2016 chkconfig.d
-rw-r--r--.  1 root root     1165 11月 14 2016 chrony.conf
-rw-r-----.  1 root chrony     62 4月  16 06:28 chrony.keys
drwxr-xr-x.  2 root root       21 416 06:23 cron.d
drwxr-xr-x.  2 root root       42 416 06:23 cron.daily
-rw-------.  1 root root        0 3月  31 2016 cron.deny
drwxr-xr-x.  2 root root       22 69 2014 cron.hourly
drwxr-xr-x.  2 root root        6 69 2014 cron.monthly
-rw-r--r--.  1 root root      451 6月   9 2014 crontab
drwxr-xr-x.  2 root root        6 69 2014 cron.weekly
-rw-------.  1 root root        0 4月  16 06:22 crypttab
-rw-r--r--.  1 root root     1620 11月  5 2016 csh.cshrc
-rw-r--r--.  1 root root      841 6月   7 2013 csh.login
drwxr-xr-x.  4 root root       78 416 06:23 dbus-1
drwxr-xr-x.  2 root root       44 416 06:26 default
drwxr-xr-x.  2 root root       23 416 06:23 depmod.d
drwxr-x---.  3 root root       24 4月  16 06:23 dhcp
-rw-r--r--.  1 root root     5090 11月  4 2016 DIR_COLORS
-rw-r--r--.  1 root root     5725 11月  4 2016 DIR_COLORS.256color
-rw-r--r--.  1 root root     4669 11月  4 2016 DIR_COLORS.lightbgcolor
-rw-r--r--.  1 root root    25213 11月 11 2016 dnsmasq.conf
drwxr-xr-x.  2 root root        6 1111 2016 dnsmasq.d
-rw-r--r--.  1 root root     1285 11月 11 2016 dracut.conf
drwxr-xr-x.  2 root root        6 1111 2016 dracut.conf.d
-rw-r--r--.  1 root root      112 11月  4 2016 e2fsck.conf
-rw-r--r--.  1 root root        0 11月  5 2016 environment
-rw-r--r--.  1 root root     1317 11月  5 2016 ethertypes
-rw-r--r--.  1 root root        0 6月   7 2013 exports
lrwxrwxrwx.  1 root root       56 416 06:22 favicon.png -> /usr/share/icons/hicolor/16x16/apps/fedora-logo-icon.png
-rw-r--r--.  1 root root       70 11月  5 2016 filesystems
drwxr-x---.  5 root root      104 4月  16 06:23 firewalld
-rw-r--r--.  1 root root      465 4月  16 06:22 fstab
drwxr-xr-x.  2 root root        6 512 2015 gcrypt
-rw-r--r--.  1 root root      842 11月  5 2016 GeoIP.conf
-rw-r--r--.  1 root root      858 11月  5 2016 GeoIP.conf.default
drwxr-xr-x.  2 root root        6 115 2016 gnupg
-rw-r--r--.  1 root root       94 4月  29 2015 GREP_COLORS
drwxr-xr-x.  4 root root       40 416 06:22 groff
-rw-r--r--.  1 root root      494 4月  16 06:23 group
-rw-r--r--.  1 root root      480 4月  16 06:23 group-
lrwxrwxrwx.  1 root root       22 416 06:23 grub2.cfg -> ../boot/grub2/grub.cfg
drwx------.  2 root root      182 4月  16 06:26 grub.d
----------.  1 root root      394 4月  16 06:23 gshadow
----------.  1 root root      383 4月  16 06:23 gshadow-
drwxr-xr-x.  3 root root       20 416 06:22 gss
-rw-r--r--.  1 root root        9 6月   7 2013 host.conf
-rw-r--r--.  1 root root       22 4月  16 06:27 hostname
-rw-r--r--.  1 root root      158 6月   7 2013 hosts
-rw-r--r--.  1 root root      370 6月   7 2013 hosts.allow
-rw-r--r--.  1 root root      460 6月   7 2013 hosts.deny
lrwxrwxrwx.  1 root root       11 416 06:22 init.d -> rc.d/init.d
-rw-r--r--.  1 root root      511 11月  5 2016 inittab
-rw-r--r--.  1 root root      942 6月   7 2013 inputrc
drwxr-xr-x.  2 root root      140 416 06:22 iproute2
-rw-r--r--.  1 root root       23 11月 29 2016 issue
-rw-r--r--.  1 root root       22 11月 29 2016 issue.net
-rw-r--r--.  1 root root     6920 4月  16 06:23 kdump.conf
drwxr-xr-x.  3 root root       24 416 06:23 kernel
-rw-r--r--.  1 root root      590 11月  4 2016 krb5.conf
drwxr-xr-x.  2 root root        6 115 2016 krb5.conf.d
-rw-r--r--.  1 root root    19024 4月  16 06:52 ld.so.cache
-rw-r--r--.  1 root root       28 2月  27 2013 ld.so.conf
drwxr-xr-x.  2 root root       74 416 06:23 ld.so.conf.d
-rw-r-----.  1 root root      191 7月  14 2016 libaudit.conf
drwxr-xr-x.  2 root root       35 416 06:22 libnl
-rw-r--r--.  1 root root     2391 10月 12 2013 libuser.conf
-rw-r--r--.  1 root root       19 4月  16 06:27 locale.conf
lrwxrwxrwx.  1 root root       38 416 06:27 localtime -> ../usr/share/zoneinfo/America/New_York
-rw-r--r--.  1 root root     2028 11月  4 2016 login.defs
-rw-r--r--.  1 root root      662 7月  31 2013 logrotate.conf
drwxr-xr-x.  2 root root       78 416 06:23 logrotate.d
drwxr-xr-x.  6 root root      100 416 06:23 lvm
-r--r--r--.  1 root root       33 4月  16 06:23 machine-id
-rw-r--r--.  1 root root      111 11月  5 2016 magic
-rw-r--r--.  1 root root     5122 11月  7 2016 makedumpfile.conf.sample
-rw-r--r--.  1 root root     5171 6月   9 2014 man_db.conf
-rw-r--r--.  1 root root      936 11月  5 2016 mke2fs.conf
drwxr-xr-x.  2 root root       41 416 06:23 modprobe.d
drwxr-xr-x.  2 root root        6 116 2016 modules-load.d
-rw-r--r--.  1 root root        0 6月   7 2013 motd
lrwxrwxrwx.  1 root root       17 416 06:22 mtab -> /proc/self/mounts
-rw-r--r--.  1 root root      570 11月 14 2016 my.cnf
drwxr-xr-x.  2 root root       31 416 06:22 my.cnf.d
drwxr-xr-x.  8 root root      145 416 06:23 NetworkManager
-rw-r--r--.  1 root root       58 11月  5 2016 networks
-rw-r--r--.  1 root root     1728 4月  16 06:27 nsswitch.conf
-rw-r--r--.  1 root root     1726 10月 22 2012 nsswitch.conf.bak
drwxr-xr-x.  3 root root       36 416 06:22 openldap
drwxr-xr-x.  2 root root        6 115 2016 opt
-rw-r--r--.  1 root root      393 11月 29 2016 os-release
drwxr-xr-x.  2 root root     4096 416 06:27 pam.d
-rw-r--r--.  1 root root     1008 4月  16 06:27 passwd
-rw-r--r--.  1 root root     1008 4月  16 06:27 passwd-
drwxr-xr-x.  3 root root       21 416 06:22 pkcs11
drwxr-xr-x.  9 root root       98 416 06:23 pki
drwxr-xr-x.  2 root root       28 416 06:23 plymouth
drwxr-xr-x.  5 root root       52 416 06:22 pm
drwxr-xr-x.  5 root root       72 416 06:23 polkit-1
drwxr-xr-x.  2 root root        6 610 2014 popt.d
drwxr-xr-x.  2 root root      154 416 06:23 postfix
drwxr-xr-x.  3 root root      219 416 06:23 ppp
drwxr-xr-x.  2 root root       78 416 06:23 prelink.conf.d
-rw-r--r--.  1 root root      233 6月   7 2013 printcap
-rw-r--r--.  1 root root     1795 11月  5 2016 profile
drwxr-xr-x.  2 root root      247 416 06:52 profile.d
-rw-r--r--.  1 root root     6545 6月   7 2013 protocols
-rw-------.  1 root root        0 4月  16 06:22 .pwd.lock
drwxr-xr-x.  2 root root       35 416 06:22 python
lrwxrwxrwx.  1 root root       10 416 06:22 rc0.d -> rc.d/rc0.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc1.d -> rc.d/rc1.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc2.d -> rc.d/rc2.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc3.d -> rc.d/rc3.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc4.d -> rc.d/rc4.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc5.d -> rc.d/rc5.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc6.d -> rc.d/rc6.d
drwxr-xr-x. 10 root root      127 416 06:23 rc.d
lrwxrwxrwx.  1 root root       13 416 06:23 rc.local -> rc.d/rc.local
drwxr-xr-x.  2 root root       57 416 06:23 rdma
lrwxrwxrwx.  1 root root       14 416 06:22 redhat-release -> centos-release
-rw-r--r--.  1 root root       74 4月  17 08:10 resolv.conf
-rw-r--r--.  1 root root     1634 12月 24 2012 rpc
drwxr-xr-x.  2 root root       44 416 06:52 rpm
-rw-r--r--.  1 root root     3232 11月  4 2016 rsyslog.conf
drwxr-xr-x.  2 root root       25 115 2016 rsyslog.d
-rw-r--r--.  1 root root      928 11月  5 2016 rwtab
drwxr-xr-x.  2 root root       23 115 2016 rwtab.d
drwxr-xr-x.  2 root root       24 416 06:23 sasl2
-rw-------.  1 root root      221 11月  5 2016 securetty
drwxr-xr-x.  6 root root     4096 416 06:22 security
drwxr-xr-x.  5 root root       81 416 06:23 selinux
-rw-r--r--.  1 root root   670293 6月   7 2013 services
-rw-r--r--.  1 root root      216 11月  7 2016 sestatus.conf
----------.  1 root root      637 4月  16 06:27 shadow
----------.  1 root root      642 4月  16 06:27 shadow-
-rw-r--r--.  1 root root       76 6月   7 2013 shells
drwxr-xr-x.  2 root root       62 416 06:22 skel
drwxr-xr-x.  2 root root      225 416 06:28 ssh
drwxr-xr-x.  2 root root       19 416 06:22 ssl
-rw-r--r--.  1 root root      212 11月  5 2016 statetab
drwxr-xr-x.  2 root root        6 115 2016 statetab.d
-rw-r--r--.  1 root root        0 11月  5 2016 subgid
-rw-r--r--.  1 root root        0 11月  5 2016 subuid
-rw-r-----.  1 root root     1786 11月  4 2016 sudo.conf
-r--r-----.  1 root root     3907 11月  4 2016 sudoers
drwxr-x---.  2 root root        6 11月  5 2016 sudoers.d
-rw-r-----.  1 root root     3181 11月  4 2016 sudo-ldap.conf
drwxr-xr-x.  6 root root     4096 417 08:10 sysconfig
-rw-r--r--.  1 root root      449 11月  5 2016 sysctl.conf
drwxr-xr-x.  2 root root       28 416 06:23 sysctl.d
drwxr-xr-x.  4 root root      151 416 06:23 systemd
lrwxrwxrwx.  1 root root       14 416 06:22 system-release -> centos-release
-rw-r--r--.  1 root root       23 11月 29 2016 system-release-cpe
-rw-------.  1 tss  tss      7046 11月 20 2015 tcsd.conf
drwxr-xr-x.  2 root root        6 610 2014 terminfo
drwxr-xr-x.  2 root root        6 116 2016 tmpfiles.d
drwxr-xr-x.  2 root root       70 416 06:23 tuned
drwxr-xr-x.  3 root root       54 416 06:28 udev
-rw-r--r--.  1 root root      163 4月  16 06:22 .updated
-rw-r--r--.  1 root root       37 4月  16 06:27 vconsole.conf
-rw-r--r--.  1 root root     1982 8月   1 2017 vimrc
-rw-r--r--.  1 root root     1982 6月  10 2014 virc
-rw-r--r--.  1 root root     4479 10月 26 12:50 wgetrc
drwxr-xr-x.  2 root root       33 416 06:23 wpa_supplicant
drwxr-xr-x.  5 root root       57 416 06:23 X11
drwxr-xr-x.  4 root root       38 416 06:23 xdg
drwxr-xr-x.  2 root root        6 115 2016 xinetd.d
drwxr-xr-x.  6 root root      100 416 06:22 yum
-rw-r--r--.  1 root root      970 11月 15 2016 yum.conf
drwxr-xr-x.  2 root root      223 416 07:10 yum.repos.d
[root@localhost etc]# ll
总用量 1084
-rw-r--r--.  1 root root       16 4月  16 06:27 adjtime
-rw-r--r--.  1 root root     1518 6月   7 2013 aliases
-rw-r--r--.  1 root root    12288 4月  16 06:28 aliases.db
drwxr-xr-x.  2 root root      236 416 06:23 alternatives
-rw-------.  1 root root      541 3月  31 2016 anacrontab
-rw-r--r--.  1 root root       55 11月  4 2016 asound.conf
drwxr-x---.  3 root root       43 4月  16 06:23 audisp
drwxr-x---.  3 root root       83 4月  16 06:28 audit
drwxr-xr-x.  2 root root       22 416 06:23 bash_completion.d
-rw-r--r--.  1 root root     2853 11月  5 2016 bashrc
drwxr-xr-x.  2 root root        6 116 2016 binfmt.d
-rw-r--r--.  1 root root       38 11月 29 2016 centos-release
-rw-r--r--.  1 root root       51 11月 29 2016 centos-release-upstream
drwxr-xr-x.  2 root root        6 115 2016 chkconfig.d
-rw-r--r--.  1 root root     1165 11月 14 2016 chrony.conf
-rw-r-----.  1 root chrony     62 4月  16 06:28 chrony.keys
drwxr-xr-x.  2 root root       21 416 06:23 cron.d
drwxr-xr-x.  2 root root       42 416 06:23 cron.daily
-rw-------.  1 root root        0 3月  31 2016 cron.deny
drwxr-xr-x.  2 root root       22 69 2014 cron.hourly
drwxr-xr-x.  2 root root        6 69 2014 cron.monthly
-rw-r--r--.  1 root root      451 6月   9 2014 crontab
drwxr-xr-x.  2 root root        6 69 2014 cron.weekly
-rw-------.  1 root root        0 4月  16 06:22 crypttab
-rw-r--r--.  1 root root     1620 11月  5 2016 csh.cshrc
-rw-r--r--.  1 root root      841 6月   7 2013 csh.login
drwxr-xr-x.  4 root root       78 416 06:23 dbus-1
drwxr-xr-x.  2 root root       44 416 06:26 default
drwxr-xr-x.  2 root root       23 416 06:23 depmod.d
drwxr-x---.  3 root root       24 4月  16 06:23 dhcp
-rw-r--r--.  1 root root     5090 11月  4 2016 DIR_COLORS
-rw-r--r--.  1 root root     5725 11月  4 2016 DIR_COLORS.256color
-rw-r--r--.  1 root root     4669 11月  4 2016 DIR_COLORS.lightbgcolor
-rw-r--r--.  1 root root    25213 11月 11 2016 dnsmasq.conf
drwxr-xr-x.  2 root root        6 1111 2016 dnsmasq.d
-rw-r--r--.  1 root root     1285 11月 11 2016 dracut.conf
drwxr-xr-x.  2 root root        6 1111 2016 dracut.conf.d
-rw-r--r--.  1 root root      112 11月  4 2016 e2fsck.conf
-rw-r--r--.  1 root root        0 11月  5 2016 environment
-rw-r--r--.  1 root root     1317 11月  5 2016 ethertypes
-rw-r--r--.  1 root root        0 6月   7 2013 exports
lrwxrwxrwx.  1 root root       56 416 06:22 favicon.png -> /usr/share/icons/hicolor/16x16/apps/fedora-logo-icon.png
-rw-r--r--.  1 root root       70 11月  5 2016 filesystems
drwxr-x---.  5 root root      104 4月  16 06:23 firewalld
-rw-r--r--.  1 root root      465 4月  16 06:22 fstab
drwxr-xr-x.  2 root root        6 512 2015 gcrypt
-rw-r--r--.  1 root root      842 11月  5 2016 GeoIP.conf
-rw-r--r--.  1 root root      858 11月  5 2016 GeoIP.conf.default
drwxr-xr-x.  2 root root        6 115 2016 gnupg
-rw-r--r--.  1 root root       94 4月  29 2015 GREP_COLORS
drwxr-xr-x.  4 root root       40 416 06:22 groff
-rw-r--r--.  1 root root      494 4月  16 06:23 group
-rw-r--r--.  1 root root      480 4月  16 06:23 group-
lrwxrwxrwx.  1 root root       22 416 06:23 grub2.cfg -> ../boot/grub2/grub.cfg
drwx------.  2 root root      182 4月  16 06:26 grub.d
----------.  1 root root      394 4月  16 06:23 gshadow
----------.  1 root root      383 4月  16 06:23 gshadow-
drwxr-xr-x.  3 root root       20 416 06:22 gss
-rw-r--r--.  1 root root        9 6月   7 2013 host.conf
-rw-r--r--.  1 root root       22 4月  16 06:27 hostname
-rw-r--r--.  1 root root      158 6月   7 2013 hosts
-rw-r--r--.  1 root root      370 6月   7 2013 hosts.allow
-rw-r--r--.  1 root root      460 6月   7 2013 hosts.deny
lrwxrwxrwx.  1 root root       11 416 06:22 init.d -> rc.d/init.d
-rw-r--r--.  1 root root      511 11月  5 2016 inittab
-rw-r--r--.  1 root root      942 6月   7 2013 inputrc
drwxr-xr-x.  2 root root      140 416 06:22 iproute2
-rw-r--r--.  1 root root       23 11月 29 2016 issue
-rw-r--r--.  1 root root       22 11月 29 2016 issue.net
-rw-r--r--.  1 root root     6920 4月  16 06:23 kdump.conf
drwxr-xr-x.  3 root root       24 416 06:23 kernel
-rw-r--r--.  1 root root      590 11月  4 2016 krb5.conf
drwxr-xr-x.  2 root root        6 115 2016 krb5.conf.d
-rw-r--r--.  1 root root    19024 4月  16 06:52 ld.so.cache
-rw-r--r--.  1 root root       28 2月  27 2013 ld.so.conf
drwxr-xr-x.  2 root root       74 416 06:23 ld.so.conf.d
-rw-r-----.  1 root root      191 7月  14 2016 libaudit.conf
drwxr-xr-x.  2 root root       35 416 06:22 libnl
-rw-r--r--.  1 root root     2391 10月 12 2013 libuser.conf
-rw-r--r--.  1 root root       19 4月  16 06:27 locale.conf
lrwxrwxrwx.  1 root root       38 416 06:27 localtime -> ../usr/share/zoneinfo/America/New_York
-rw-r--r--.  1 root root     2028 11月  4 2016 login.defs
-rw-r--r--.  1 root root      662 7月  31 2013 logrotate.conf
drwxr-xr-x.  2 root root       78 416 06:23 logrotate.d
drwxr-xr-x.  6 root root      100 416 06:23 lvm
-r--r--r--.  1 root root       33 4月  16 06:23 machine-id
-rw-r--r--.  1 root root      111 11月  5 2016 magic
-rw-r--r--.  1 root root     5122 11月  7 2016 makedumpfile.conf.sample
-rw-r--r--.  1 root root     5171 6月   9 2014 man_db.conf
-rw-r--r--.  1 root root      936 11月  5 2016 mke2fs.conf
drwxr-xr-x.  2 root root       41 416 06:23 modprobe.d
drwxr-xr-x.  2 root root        6 116 2016 modules-load.d
-rw-r--r--.  1 root root        0 6月   7 2013 motd
lrwxrwxrwx.  1 root root       17 416 06:22 mtab -> /proc/self/mounts
-rw-r--r--.  1 root root      570 11月 14 2016 my.cnf
drwxr-xr-x.  2 root root       31 416 06:22 my.cnf.d
drwxr-xr-x.  8 root root      145 416 06:23 NetworkManager
-rw-r--r--.  1 root root       58 11月  5 2016 networks
-rw-r--r--.  1 root root     1728 4月  16 06:27 nsswitch.conf
-rw-r--r--.  1 root root     1726 10月 22 2012 nsswitch.conf.bak
drwxr-xr-x.  3 root root       36 416 06:22 openldap
drwxr-xr-x.  2 root root        6 115 2016 opt
-rw-r--r--.  1 root root      393 11月 29 2016 os-release
drwxr-xr-x.  2 root root     4096 416 06:27 pam.d
-rw-r--r--.  1 root root     1008 4月  16 06:27 passwd
-rw-r--r--.  1 root root     1008 4月  16 06:27 passwd-
drwxr-xr-x.  3 root root       21 416 06:22 pkcs11
drwxr-xr-x.  9 root root       98 416 06:23 pki
drwxr-xr-x.  2 root root       28 416 06:23 plymouth
drwxr-xr-x.  5 root root       52 416 06:22 pm
drwxr-xr-x.  5 root root       72 416 06:23 polkit-1
drwxr-xr-x.  2 root root        6 610 2014 popt.d
drwxr-xr-x.  2 root root      154 416 06:23 postfix
drwxr-xr-x.  3 root root      219 416 06:23 ppp
drwxr-xr-x.  2 root root       78 416 06:23 prelink.conf.d
-rw-r--r--.  1 root root      233 6月   7 2013 printcap
-rw-r--r--.  1 root root     1795 11月  5 2016 profile
drwxr-xr-x.  2 root root      247 416 06:52 profile.d
-rw-r--r--.  1 root root     6545 6月   7 2013 protocols
drwxr-xr-x.  2 root root       35 416 06:22 python
lrwxrwxrwx.  1 root root       10 416 06:22 rc0.d -> rc.d/rc0.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc1.d -> rc.d/rc1.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc2.d -> rc.d/rc2.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc3.d -> rc.d/rc3.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc4.d -> rc.d/rc4.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc5.d -> rc.d/rc5.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc6.d -> rc.d/rc6.d
drwxr-xr-x. 10 root root      127 416 06:23 rc.d
lrwxrwxrwx.  1 root root       13 416 06:23 rc.local -> rc.d/rc.local
drwxr-xr-x.  2 root root       57 416 06:23 rdma
lrwxrwxrwx.  1 root root       14 416 06:22 redhat-release -> centos-release
-rw-r--r--.  1 root root       74 4月  17 08:10 resolv.conf
-rw-r--r--.  1 root root     1634 12月 24 2012 rpc
drwxr-xr-x.  2 root root       44 416 06:52 rpm
-rw-r--r--.  1 root root     3232 11月  4 2016 rsyslog.conf
drwxr-xr-x.  2 root root       25 115 2016 rsyslog.d
-rw-r--r--.  1 root root      928 11月  5 2016 rwtab
drwxr-xr-x.  2 root root       23 115 2016 rwtab.d
drwxr-xr-x.  2 root root       24 416 06:23 sasl2
-rw-------.  1 root root      221 11月  5 2016 securetty
drwxr-xr-x.  6 root root     4096 416 06:22 security
drwxr-xr-x.  5 root root       81 416 06:23 selinux
-rw-r--r--.  1 root root   670293 6月   7 2013 services
-rw-r--r--.  1 root root      216 11月  7 2016 sestatus.conf
----------.  1 root root      637 4月  16 06:27 shadow
----------.  1 root root      642 4月  16 06:27 shadow-
-rw-r--r--.  1 root root       76 6月   7 2013 shells
drwxr-xr-x.  2 root root       62 416 06:22 skel
drwxr-xr-x.  2 root root      225 416 06:28 ssh
drwxr-xr-x.  2 root root       19 416 06:22 ssl
-rw-r--r--.  1 root root      212 11月  5 2016 statetab
drwxr-xr-x.  2 root root        6 115 2016 statetab.d
-rw-r--r--.  1 root root        0 11月  5 2016 subgid
-rw-r--r--.  1 root root        0 11月  5 2016 subuid
-rw-r-----.  1 root root     1786 11月  4 2016 sudo.conf
-r--r-----.  1 root root     3907 11月  4 2016 sudoers
drwxr-x---.  2 root root        6 11月  5 2016 sudoers.d
-rw-r-----.  1 root root     3181 11月  4 2016 sudo-ldap.conf
drwxr-xr-x.  6 root root     4096 417 08:10 sysconfig
-rw-r--r--.  1 root root      449 11月  5 2016 sysctl.conf
drwxr-xr-x.  2 root root       28 416 06:23 sysctl.d
drwxr-xr-x.  4 root root      151 416 06:23 systemd
lrwxrwxrwx.  1 root root       14 416 06:22 system-release -> centos-release
-rw-r--r--.  1 root root       23 11月 29 2016 system-release-cpe
-rw-------.  1 tss  tss      7046 11月 20 2015 tcsd.conf
drwxr-xr-x.  2 root root        6 610 2014 terminfo
drwxr-xr-x.  2 root root        6 116 2016 tmpfiles.d
drwxr-xr-x.  2 root root       70 416 06:23 tuned
drwxr-xr-x.  3 root root       54 416 06:28 udev
-rw-r--r--.  1 root root       37 4月  16 06:27 vconsole.conf
-rw-r--r--.  1 root root     1982 8月   1 2017 vimrc
-rw-r--r--.  1 root root     1982 6月  10 2014 virc
-rw-r--r--.  1 root root     4479 10月 26 12:50 wgetrc
drwxr-xr-x.  2 root root       33 416 06:23 wpa_supplicant
drwxr-xr-x.  5 root root       57 416 06:23 X11
drwxr-xr-x.  4 root root       38 416 06:23 xdg
drwxr-xr-x.  2 root root        6 115 2016 xinetd.d
drwxr-xr-x.  6 root root      100 416 06:22 yum
-rw-r--r--.  1 root root      970 11月 15 2016 yum.conf
drwxr-xr-x.  2 root root      223 416 07:10 yum.repos.d
[root@localhost etc]# cd /tmp/
[root@localhost tmp]# touch imooc
[root@localhost tmp]# ll
总用量 4
-rw-r--r--. 1 root root   0 4月  17 08:29 imooc
-rwx------. 1 root root 836 4月  16 06:28 ks-script-At5Czm
-rw-------. 1 root root   0 4月  16 06:22 yum.log
[root@localhost tmp]# touch imooc.log
[root@localhost tmp]# ls
imooc  imooc.log  ks-script-At5Czm  yum.log
[root@localhost tmp]# mkdir imooc
mkdir: 无法创建目录"imooc": 文件已存在
[root@localhost tmp]# mkdir imooc1
[root@localhost tmp]# ls
imooc  imooc1  imooc.log  ks-script-At5Czm  yum.log
[root@localhost tmp]# ls -al
总用量 4
drwxrwxrwt.  8 root root 176 417 08:29 .
dr-xr-xr-x. 17 root root 224 416 06:26 ..
drwxrwxrwt.  2 root root   6 416 06:23 .font-unix
drwxrwxrwt.  2 root root   6 416 06:23 .ICE-unix
-rw-r--r--.  1 root root   0 4月  17 08:29 imooc
drwxr-xr-x.  2 root root   6 417 08:29 imooc1
-rw-r--r--.  1 root root   0 4月  17 08:29 imooc.log
-rwx------.  1 root root 836 4月  16 06:28 ks-script-At5Czm
drwxrwxrwt.  2 root root   6 416 06:23 .Test-unix
drwxrwxrwt.  2 root root   6 416 06:23 .X11-unix
drwxrwxrwt.  2 root root   6 416 06:23 .XIM-unix
-rw-------.  1 root root   0 4月  16 06:22 yum.log
[root@localhost tmp]# 
[root@localhost tmp]# mkdir -p /imooc1/test1/test2
[root@localhost tmp]# ls -al
总用量 4
drwxrwxrwt.  8 root root 176 417 08:29 .
dr-xr-xr-x. 18 root root 238 417 08:30 ..
drwxrwxrwt.  2 root root   6 416 06:23 .font-unix
drwxrwxrwt.  2 root root   6 416 06:23 .ICE-unix
-rw-r--r--.  1 root root   0 4月  17 08:29 imooc
drwxr-xr-x.  2 root root   6 417 08:29 imooc1
-rw-r--r--.  1 root root   0 4月  17 08:29 imooc.log
-rwx------.  1 root root 836 4月  16 06:28 ks-script-At5Czm
drwxrwxrwt.  2 root root   6 416 06:23 .Test-unix
drwxrwxrwt.  2 root root   6 416 06:23 .X11-unix
drwxrwxrwt.  2 root root   6 416 06:23 .XIM-unix
-rw-------.  1 root root   0 4月  16 06:22 yum.log
[root@localhost tmp]# cd imooc1
[root@localhost imooc1]# ls
[root@localhost imooc1]# ll
总用量 0
[root@localhost imooc1]# cd /tmp
[root@localhost tmp]# ls
imooc  imooc1  imooc.log  ks-script-At5Czm  yum.log
[root@localhost tmp]# rm -r imooc
rm:是否删除普通空文件 "imooc"?y
[root@localhost tmp]# rm -r imooc1/
rm:是否删除目录 "imooc1/"?y
[root@localhost tmp]# rm -f imooc.log
[root@localhost tmp]# 
[root@localhost tmp]# ls
ks-script-At5Czm  yum.log
[root@localhost tmp]# touch imooc.log
[root@localhost tmp]# cp ./imooc.log
cp: 在"./imooc.log" 后缺少了要操作的目标文件
Try 'cp --help' for more information.
[root@localhost tmp]# cp ./imooc.log ~/imooc2.log
[root@localhost tmp]# cd
[root@localhost ~]# ls
anaconda-ks.cfg  imooc2.log
[root@localhost ~]# mv imooc2.log /tmp/
[root@localhost ~]# cd /tmp
[root@localhost tmp]# ls
imooc2.log  imooc.log  ks-script-At5Czm  yum.log
[root@localhost tmp]# pwd
/tmp
[root@localhost tmp]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# pwd
/etc/yum.repos.d
[root@localhost yum.repos.d]# cd
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# cd /tmp
[root@localhost tmp]# vim mooc
[root@localhost tmp]# ls
imooc2.log  imooc.log  ks-script-At5Czm  mooc  yum.log
[root@localhost tmp]# cat imooc
cat: imooc: 没有那个文件或目录
[root@localhost tmp]# cat mooc
12312312452312341234581234
8127439817
ndjsafa;lksdncozanMSdoifamliowejr
nsadjkfnkjasnckjam[poweijfowqae
fasdjknclas,df;k jql;wkem jkl ahsndlfk als;djk fa
sdncoamopc, -aw ,ekl;fjd l;wa
[root@localhost tmp]# ll
总用量 8
-rw-r--r--. 1 root root   0 4月  17 08:32 imooc2.log
-rw-r--r--. 1 root root   0 4月  17 08:32 imooc.log
-rwx------. 1 root root 836 4月  16 06:28 ks-script-At5Czm
-rw-r--r--. 1 root root 188 4月  17 08:37 mooc
-rw-------. 1 root root   0 4月  16 06:22 yum.log
[root@localhost tmp]# cd /etc
[root@localhost etc]# ll
总用量 1084
-rw-r--r--.  1 root root       16 4月  16 06:27 adjtime
-rw-r--r--.  1 root root     1518 6月   7 2013 aliases
-rw-r--r--.  1 root root    12288 4月  16 06:28 aliases.db
drwxr-xr-x.  2 root root      236 416 06:23 alternatives
-rw-------.  1 root root      541 3月  31 2016 anacrontab
-rw-r--r--.  1 root root       55 11月  4 2016 asound.conf
drwxr-x---.  3 root root       43 4月  16 06:23 audisp
drwxr-x---.  3 root root       83 4月  16 06:28 audit
drwxr-xr-x.  2 root root       22 416 06:23 bash_completion.d
-rw-r--r--.  1 root root     2853 11月  5 2016 bashrc
drwxr-xr-x.  2 root root        6 116 2016 binfmt.d
-rw-r--r--.  1 root root       38 11月 29 2016 centos-release
-rw-r--r--.  1 root root       51 11月 29 2016 centos-release-upstream
drwxr-xr-x.  2 root root        6 115 2016 chkconfig.d
-rw-r--r--.  1 root root     1165 11月 14 2016 chrony.conf
-rw-r-----.  1 root chrony     62 4月  16 06:28 chrony.keys
drwxr-xr-x.  2 root root       21 416 06:23 cron.d
drwxr-xr-x.  2 root root       42 416 06:23 cron.daily
-rw-------.  1 root root        0 3月  31 2016 cron.deny
drwxr-xr-x.  2 root root       22 69 2014 cron.hourly
drwxr-xr-x.  2 root root        6 69 2014 cron.monthly
-rw-r--r--.  1 root root      451 6月   9 2014 crontab
drwxr-xr-x.  2 root root        6 69 2014 cron.weekly
-rw-------.  1 root root        0 4月  16 06:22 crypttab
-rw-r--r--.  1 root root     1620 11月  5 2016 csh.cshrc
-rw-r--r--.  1 root root      841 6月   7 2013 csh.login
drwxr-xr-x.  4 root root       78 416 06:23 dbus-1
drwxr-xr-x.  2 root root       44 416 06:26 default
drwxr-xr-x.  2 root root       23 416 06:23 depmod.d
drwxr-x---.  3 root root       24 4月  16 06:23 dhcp
-rw-r--r--.  1 root root     5090 11月  4 2016 DIR_COLORS
-rw-r--r--.  1 root root     5725 11月  4 2016 DIR_COLORS.256color
-rw-r--r--.  1 root root     4669 11月  4 2016 DIR_COLORS.lightbgcolor
-rw-r--r--.  1 root root    25213 11月 11 2016 dnsmasq.conf
drwxr-xr-x.  2 root root        6 1111 2016 dnsmasq.d
-rw-r--r--.  1 root root     1285 11月 11 2016 dracut.conf
drwxr-xr-x.  2 root root        6 1111 2016 dracut.conf.d
-rw-r--r--.  1 root root      112 11月  4 2016 e2fsck.conf
-rw-r--r--.  1 root root        0 11月  5 2016 environment
-rw-r--r--.  1 root root     1317 11月  5 2016 ethertypes
-rw-r--r--.  1 root root        0 6月   7 2013 exports
lrwxrwxrwx.  1 root root       56 416 06:22 favicon.png -> /usr/share/icons/hicolor/16x16/apps/fedora-logo-icon.png
-rw-r--r--.  1 root root       70 11月  5 2016 filesystems
drwxr-x---.  5 root root      104 4月  16 06:23 firewalld
-rw-r--r--.  1 root root      465 4月  16 06:22 fstab
drwxr-xr-x.  2 root root        6 512 2015 gcrypt
-rw-r--r--.  1 root root      842 11月  5 2016 GeoIP.conf
-rw-r--r--.  1 root root      858 11月  5 2016 GeoIP.conf.default
drwxr-xr-x.  2 root root        6 115 2016 gnupg
-rw-r--r--.  1 root root       94 4月  29 2015 GREP_COLORS
drwxr-xr-x.  4 root root       40 416 06:22 groff
-rw-r--r--.  1 root root      494 4月  16 06:23 group
-rw-r--r--.  1 root root      480 4月  16 06:23 group-
lrwxrwxrwx.  1 root root       22 416 06:23 grub2.cfg -> ../boot/grub2/grub.cfg
drwx------.  2 root root      182 4月  16 06:26 grub.d
----------.  1 root root      394 4月  16 06:23 gshadow
----------.  1 root root      383 4月  16 06:23 gshadow-
drwxr-xr-x.  3 root root       20 416 06:22 gss
-rw-r--r--.  1 root root        9 6月   7 2013 host.conf
-rw-r--r--.  1 root root       22 4月  16 06:27 hostname
-rw-r--r--.  1 root root      158 6月   7 2013 hosts
-rw-r--r--.  1 root root      370 6月   7 2013 hosts.allow
-rw-r--r--.  1 root root      460 6月   7 2013 hosts.deny
lrwxrwxrwx.  1 root root       11 416 06:22 init.d -> rc.d/init.d
-rw-r--r--.  1 root root      511 11月  5 2016 inittab
-rw-r--r--.  1 root root      942 6月   7 2013 inputrc
drwxr-xr-x.  2 root root      140 416 06:22 iproute2
-rw-r--r--.  1 root root       23 11月 29 2016 issue
-rw-r--r--.  1 root root       22 11月 29 2016 issue.net
-rw-r--r--.  1 root root     6920 4月  16 06:23 kdump.conf
drwxr-xr-x.  3 root root       24 416 06:23 kernel
-rw-r--r--.  1 root root      590 11月  4 2016 krb5.conf
drwxr-xr-x.  2 root root        6 115 2016 krb5.conf.d
-rw-r--r--.  1 root root    19024 4月  16 06:52 ld.so.cache
-rw-r--r--.  1 root root       28 2月  27 2013 ld.so.conf
drwxr-xr-x.  2 root root       74 416 06:23 ld.so.conf.d
-rw-r-----.  1 root root      191 7月  14 2016 libaudit.conf
drwxr-xr-x.  2 root root       35 416 06:22 libnl
-rw-r--r--.  1 root root     2391 10月 12 2013 libuser.conf
-rw-r--r--.  1 root root       19 4月  16 06:27 locale.conf
lrwxrwxrwx.  1 root root       38 416 06:27 localtime -> ../usr/share/zoneinfo/America/New_York
-rw-r--r--.  1 root root     2028 11月  4 2016 login.defs
-rw-r--r--.  1 root root      662 7月  31 2013 logrotate.conf
drwxr-xr-x.  2 root root       78 416 06:23 logrotate.d
drwxr-xr-x.  6 root root      100 416 06:23 lvm
-r--r--r--.  1 root root       33 4月  16 06:23 machine-id
-rw-r--r--.  1 root root      111 11月  5 2016 magic
-rw-r--r--.  1 root root     5122 11月  7 2016 makedumpfile.conf.sample
-rw-r--r--.  1 root root     5171 6月   9 2014 man_db.conf
-rw-r--r--.  1 root root      936 11月  5 2016 mke2fs.conf
drwxr-xr-x.  2 root root       41 416 06:23 modprobe.d
drwxr-xr-x.  2 root root        6 116 2016 modules-load.d
-rw-r--r--.  1 root root        0 6月   7 2013 motd
lrwxrwxrwx.  1 root root       17 416 06:22 mtab -> /proc/self/mounts
-rw-r--r--.  1 root root      570 11月 14 2016 my.cnf
drwxr-xr-x.  2 root root       31 416 06:22 my.cnf.d
drwxr-xr-x.  8 root root      145 416 06:23 NetworkManager
-rw-r--r--.  1 root root       58 11月  5 2016 networks
-rw-r--r--.  1 root root     1728 4月  16 06:27 nsswitch.conf
-rw-r--r--.  1 root root     1726 10月 22 2012 nsswitch.conf.bak
drwxr-xr-x.  3 root root       36 416 06:22 openldap
drwxr-xr-x.  2 root root        6 115 2016 opt
-rw-r--r--.  1 root root      393 11月 29 2016 os-release
drwxr-xr-x.  2 root root     4096 416 06:27 pam.d
-rw-r--r--.  1 root root     1008 4月  16 06:27 passwd
-rw-r--r--.  1 root root     1008 4月  16 06:27 passwd-
drwxr-xr-x.  3 root root       21 416 06:22 pkcs11
drwxr-xr-x.  9 root root       98 416 06:23 pki
drwxr-xr-x.  2 root root       28 416 06:23 plymouth
drwxr-xr-x.  5 root root       52 416 06:22 pm
drwxr-xr-x.  5 root root       72 416 06:23 polkit-1
drwxr-xr-x.  2 root root        6 610 2014 popt.d
drwxr-xr-x.  2 root root      154 416 06:23 postfix
drwxr-xr-x.  3 root root      219 416 06:23 ppp
drwxr-xr-x.  2 root root       78 416 06:23 prelink.conf.d
-rw-r--r--.  1 root root      233 6月   7 2013 printcap
-rw-r--r--.  1 root root     1795 11月  5 2016 profile
drwxr-xr-x.  2 root root      247 416 06:52 profile.d
-rw-r--r--.  1 root root     6545 6月   7 2013 protocols
drwxr-xr-x.  2 root root       35 416 06:22 python
lrwxrwxrwx.  1 root root       10 416 06:22 rc0.d -> rc.d/rc0.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc1.d -> rc.d/rc1.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc2.d -> rc.d/rc2.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc3.d -> rc.d/rc3.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc4.d -> rc.d/rc4.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc5.d -> rc.d/rc5.d
lrwxrwxrwx.  1 root root       10 416 06:22 rc6.d -> rc.d/rc6.d
drwxr-xr-x. 10 root root      127 416 06:23 rc.d
lrwxrwxrwx.  1 root root       13 416 06:23 rc.local -> rc.d/rc.local
drwxr-xr-x.  2 root root       57 416 06:23 rdma
lrwxrwxrwx.  1 root root       14 416 06:22 redhat-release -> centos-release
-rw-r--r--.  1 root root       74 4月  17 08:10 resolv.conf
-rw-r--r--.  1 root root     1634 12月 24 2012 rpc
drwxr-xr-x.  2 root root       44 416 06:52 rpm
-rw-r--r--.  1 root root     3232 11月  4 2016 rsyslog.conf
drwxr-xr-x.  2 root root       25 115 2016 rsyslog.d
-rw-r--r--.  1 root root      928 11月  5 2016 rwtab
drwxr-xr-x.  2 root root       23 115 2016 rwtab.d
drwxr-xr-x.  2 root root       24 416 06:23 sasl2
-rw-------.  1 root root      221 11月  5 2016 securetty
drwxr-xr-x.  6 root root     4096 416 06:22 security
drwxr-xr-x.  5 root root       81 416 06:23 selinux
-rw-r--r--.  1 root root   670293 6月   7 2013 services
-rw-r--r--.  1 root root      216 11月  7 2016 sestatus.conf
----------.  1 root root      637 4月  16 06:27 shadow
----------.  1 root root      642 4月  16 06:27 shadow-
-rw-r--r--.  1 root root       76 6月   7 2013 shells
drwxr-xr-x.  2 root root       62 416 06:22 skel
drwxr-xr-x.  2 root root      225 416 06:28 ssh
drwxr-xr-x.  2 root root       19 416 06:22 ssl
-rw-r--r--.  1 root root      212 11月  5 2016 statetab
drwxr-xr-x.  2 root root        6 115 2016 statetab.d
-rw-r--r--.  1 root root        0 11月  5 2016 subgid
-rw-r--r--.  1 root root        0 11月  5 2016 subuid
-rw-r-----.  1 root root     1786 11月  4 2016 sudo.conf
-r--r-----.  1 root root     3907 11月  4 2016 sudoers
drwxr-x---.  2 root root        6 11月  5 2016 sudoers.d
-rw-r-----.  1 root root     3181 11月  4 2016 sudo-ldap.conf
drwxr-xr-x.  6 root root     4096 417 08:10 sysconfig
-rw-r--r--.  1 root root      449 11月  5 2016 sysctl.conf
drwxr-xr-x.  2 root root       28 416 06:23 sysctl.d
drwxr-xr-x.  4 root root      151 416 06:23 systemd
lrwxrwxrwx.  1 root root       14 416 06:22 system-release -> centos-release
-rw-r--r--.  1 root root       23 11月 29 2016 system-release-cpe
-rw-------.  1 tss  tss      7046 11月 20 2015 tcsd.conf
drwxr-xr-x.  2 root root        6 610 2014 terminfo
drwxr-xr-x.  2 root root        6 116 2016 tmpfiles.d
drwxr-xr-x.  2 root root       70 416 06:23 tuned
drwxr-xr-x.  3 root root       54 416 06:28 udev
-rw-r--r--.  1 root root       37 4月  16 06:27 vconsole.conf
-rw-r--r--.  1 root root     1982 8月   1 2017 vimrc
-rw-r--r--.  1 root root     1982 6月  10 2014 virc
-rw-r--r--.  1 root root     4479 10月 26 12:50 wgetrc
drwxr-xr-x.  2 root root       33 416 06:23 wpa_supplicant
drwxr-xr-x.  5 root root       57 416 06:23 X11
drwxr-xr-x.  4 root root       38 416 06:23 xdg
drwxr-xr-x.  2 root root        6 115 2016 xinetd.d
drwxr-xr-x.  6 root root      100 416 06:22 yum
-rw-r--r--.  1 root root      970 11月 15 2016 yum.conf
drwxr-xr-x.  2 root root      223 416 07:10 yum.repos.d
[root@localhost etc]# 
[root@localhost etc]# 
[root@localhost etc]# cd/tmp
-bash: cd/tmp: 没有那个文件或目录
[root@localhost etc]# cd /tmp
[root@localhost tmp]# ll
总用量 8
-rw-r--r--. 1 root root   0 4月  17 08:32 imooc2.log
-rw-r--r--. 1 root root   0 4月  17 08:32 imooc.log
-rwx------. 1 root root 836 4月  16 06:28 ks-script-At5Czm
-rw-r--r--. 1 root root 188 4月  17 08:37 mooc
-rw-------. 1 root root   0 4月  16 06:22 yum.log
[root@localhost tmp]# tail mooc
12312312452312341234581234
8127439817
ndjsafa;lksdncozanMSdoifamliowejr
nsadjkfnkjasnckjam[poweijfowqae
fasdjknclas,df;k jql;wkem jkl ahsndlfk als;djk fa
sdncoamopc, -aw ,ekl;fjd l;wa
[root@localhost tmp]# head mooc
12312312452312341234581234
8127439817
ndjsafa;lksdncozanMSdoifamliowejr
nsadjkfnkjasnckjam[poweijfowqae
fasdjknclas,df;k jql;wkem jkl ahsndlfk als;djk fa
sdncoamopc, -aw ,ekl;fjd l;wa
[root@localhost tmp]# cat mooc
12312312452312341234581234
8127439817
ndjsafa;lksdncozanMSdoifamliowejr
nsadjkfnkjasnckjam[poweijfowqae
fasdjknclas,df;k jql;wkem jkl ahsndlfk als;djk fa
sdncoamopc, -aw ,ekl;fjd l;wa
[root@localhost tmp]# ls
imooc2.log  imooc.log  ks-script-At5Czm  mooc  yum.log
[root@localhost tmp]# ls-al
-bash: ls-al: 未找到命令
[root@localhost tmp]# ls -al
总用量 8
drwxrwxrwt.  7 root root 179 417 08:37 .
dr-xr-xr-x. 18 root root 238 417 08:30 ..
drwxrwxrwt.  2 root root   6 416 06:23 .font-unix
drwxrwxrwt.  2 root root   6 416 06:23 .ICE-unix
-rw-r--r--.  1 root root   0 4月  17 08:32 imooc2.log
-rw-r--r--.  1 root root   0 4月  17 08:32 imooc.log
-rwx------.  1 root root 836 4月  16 06:28 ks-script-At5Czm
-rw-r--r--.  1 root root 188 4月  17 08:37 mooc
drwxrwxrwt.  2 root root   6 416 06:23 .Test-unix
drwxrwxrwt.  2 root root   6 416 06:23 .X11-unix
drwxrwxrwt.  2 root root   6 416 06:23 .XIM-unix
-rw-------.  1 root root   0 4月  16 06:22 yum.log
[root@localhost tmp]# more mooc
12312312452312341234581234
8127439817
ndjsafa;lksdncozanMSdoifamliowejr
nsadjkfnkjasnckjam[poweijfowqae
fasdjknclas,df;k jql;wkem jkl ahsndlfk als;djk fa
sdncoamopc, -aw ,ekl;fjd l;wa
[root@localhost tmp]# 
[root@localhost tmp]# 
[root@localhost tmp]# grep "123" mooc
12312312452312341234581234
[root@localhost tmp]# grep -n "123" mooc
1:1231231245232:12341234581234
[root@localhost tmp]# grep -n "128948594323" mooc
[root@localhost tmp]# cat mooc
12312312452312341234581234
8127439817
ndjsafa;lksdncozanMSdoifamliowejr
nsadjkfnkjasnckjam[poweijfowqae
fasdjknclas,df;k jql;wkem jkl ahsndlfk als;djk fa
sdncoamopc, -aw ,ekl;fjd l;wa
[root@localhost tmp]# vim mooc
[root@localhost tmp]# vim mooc |wc
Vim: 警告: 输出不是到终端(屏幕)




[2]+  已停止               vim mooc | wc
[root@localhost tmp]# cat mooc |wc
      7      15     188
[root@localhost tmp]# cat mooc |wc -1
wc:无效选项 -- 1
Try 'wc --help' for more information.
[root@localhost tmp]# cat mooc |wc -l
7
[root@localhost tmp]# find .
.
./yum.log
./.ICE-unix
./.Test-unix
./.XIM-unix
./.font-unix
./.X11-unix
./ks-script-At5Czm
./imooc.log
./imooc2.log
./mooc
./.mooc.swp
[root@localhost tmp]# find mooc
mooc
[root@localhost tmp]# find .mooc
find: ‘.mooc’: 没有那个文件或目录
[root@localhost tmp]# find -name "mooc"
./mooc
[root@localhost tmp]# find -name "*ooc"
./mooc
[root@localhost tmp]# ;s
-bash: 未预期的符号 `;' 附近有语法错误
[root@localhost tmp]# ls
imooc2.log  imooc.log  ks-script-At5Czm  mooc  yum.log
[root@localhost tmp]# find -name "*.log"
./yum.log
./imooc.log
./imooc2.log
[root@localhost tmp]# 
[root@localhost tmp]# 
[root@localhost tmp]# 
[root@localhost tmp]# find . -type f
./yum.log
./ks-script-At5Czm
./imooc.log
./imooc2.log
./mooc
./.mooc.swp
[root@localhost tmp]# find . -type d
.
./.ICE-unix
./.Test-unix
./.XIM-unix
./.font-unix
./.X11-unix
[root@localhost tmp]# find /etc. -type d
find: ‘/etc.’: 没有那个文件或目录
[root@localhost tmp]# find /etc . -type d
/etc
/etc/pki
/etc/pki/rpm-gpg
/etc/pki/ca-trust
/etc/pki/ca-trust/extracted
/etc/pki/ca-trust/extracted/java
/etc/pki/ca-trust/extracted/openssl
/etc/pki/ca-trust/extracted/pem
/etc/pki/ca-trust/source
/etc/pki/ca-trust/source/anchors
/etc/pki/ca-trust/source/blacklist
/etc/pki/java
/etc/pki/tls
/etc/pki/tls/certs
/etc/pki/tls/misc
/etc/pki/tls/private
/etc/pki/CA
/etc/pki/CA/certs
/etc/pki/CA/crl
/etc/pki/CA/newcerts
/etc/pki/CA/private
/etc/pki/nssdb
/etc/pki/rsyslog
/etc/rpm
/etc/yum.repos.d
/etc/yum
/etc/yum/vars
/etc/yum/pluginconf.d
/etc/yum/fssnap.d
/etc/yum/protected.d
/etc/lvm
/etc/lvm/archive
/etc/lvm/backup
/etc/lvm/cache
/etc/lvm/profile
/etc/sasl2
/etc/openldap
/etc/openldap/certs
/etc/groff
/etc/groff/site-font
/etc/groff/site-tmac
/etc/rdma
/etc/iproute2
/etc/ssl
/etc/cron.monthly
/etc/gnupg
/etc/dbus-1
/etc/dbus-1/system.d
/etc/dbus-1/session.d
/etc/selinux
/etc/selinux/tmp
/etc/selinux/targeted
/etc/selinux/targeted/active
/etc/selinux/targeted/active/modules
/etc/selinux/targeted/active/modules/100
/etc/selinux/targeted/active/modules/100/abrt
/etc/selinux/targeted/active/modules/100/accountsd
/etc/selinux/targeted/active/modules/100/acct
/etc/selinux/targeted/active/modules/100/afs
/etc/selinux/targeted/active/modules/100/aiccu
/etc/selinux/targeted/active/modules/100/aide
/etc/selinux/targeted/active/modules/100/ajaxterm
/etc/selinux/targeted/active/modules/100/alsa
/etc/selinux/targeted/active/modules/100/amanda
/etc/selinux/targeted/active/modules/100/amtu
/etc/selinux/targeted/active/modules/100/anaconda
/etc/selinux/targeted/active/modules/100/antivirus
/etc/selinux/targeted/active/modules/100/apache
/etc/selinux/targeted/active/modules/100/apcupsd
/etc/selinux/targeted/active/modules/100/apm
/etc/selinux/targeted/active/modules/100/application
/etc/selinux/targeted/active/modules/100/arpwatch
/etc/selinux/targeted/active/modules/100/asterisk
/etc/selinux/targeted/active/modules/100/auditadm
/etc/selinux/targeted/active/modules/100/authconfig
/etc/selinux/targeted/active/modules/100/authlogin
/etc/selinux/targeted/active/modules/100/automount
/etc/selinux/targeted/active/modules/100/avahi
/etc/selinux/targeted/active/modules/100/awstats
/etc/selinux/targeted/active/modules/100/bacula
/etc/selinux/targeted/active/modules/100/base
/etc/selinux/targeted/active/modules/100/bcfg2
/etc/selinux/targeted/active/modules/100/bind
/etc/selinux/targeted/active/modules/100/bitlbee
/etc/selinux/targeted/active/modules/100/blkmapd
/etc/selinux/targeted/active/modules/100/blueman
/etc/selinux/targeted/active/modules/100/bluetooth
/etc/selinux/targeted/active/modules/100/boinc
/etc/selinux/targeted/active/modules/100/bootloader
/etc/selinux/targeted/active/modules/100/brctl
/etc/selinux/targeted/active/modules/100/brltty
/etc/selinux/targeted/active/modules/100/bugzilla
/etc/selinux/targeted/active/modules/100/bumblebee
/etc/selinux/targeted/active/modules/100/cachefilesd
/etc/selinux/targeted/active/modules/100/calamaris
/etc/selinux/targeted/active/modules/100/callweaver
/etc/selinux/targeted/active/modules/100/canna
/etc/selinux/targeted/active/modules/100/ccs
/etc/selinux/targeted/active/modules/100/cdrecord
/etc/selinux/targeted/active/modules/100/certmaster
/etc/selinux/targeted/active/modules/100/certmonger
/etc/selinux/targeted/active/modules/100/certwatch
/etc/selinux/targeted/active/modules/100/cfengine
/etc/selinux/targeted/active/modules/100/cgdcbxd
/etc/selinux/targeted/active/modules/100/cgroup
/etc/selinux/targeted/active/modules/100/chrome
/etc/selinux/targeted/active/modules/100/chronyd
/etc/selinux/targeted/active/modules/100/cinder
/etc/selinux/targeted/active/modules/100/cipe
/etc/selinux/targeted/active/modules/100/clock
/etc/selinux/targeted/active/modules/100/clogd
/etc/selinux/targeted/active/modules/100/cloudform
/etc/selinux/targeted/active/modules/100/cmirrord
/etc/selinux/targeted/active/modules/100/cobbler
/etc/selinux/targeted/active/modules/100/cockpit
/etc/selinux/targeted/active/modules/100/collectd
/etc/selinux/targeted/active/modules/100/colord
/etc/selinux/targeted/active/modules/100/comsat
/etc/selinux/targeted/active/modules/100/condor
/etc/selinux/targeted/active/modules/100/conman
/etc/selinux/targeted/active/modules/100/consolekit
/etc/selinux/targeted/active/modules/100/couchdb
/etc/selinux/targeted/active/modules/100/courier
/etc/selinux/targeted/active/modules/100/cpucontrol
/etc/selinux/targeted/active/modules/100/cpufreqselector
/etc/selinux/targeted/active/modules/100/cpuplug
/etc/selinux/targeted/active/modules/100/cron
/etc/selinux/targeted/active/modules/100/ctdb
/etc/selinux/targeted/active/modules/100/cups
/etc/selinux/targeted/active/modules/100/cvs
/etc/selinux/targeted/active/modules/100/cyphesis
/etc/selinux/targeted/active/modules/100/cyrus
/etc/selinux/targeted/active/modules/100/daemontools
/etc/selinux/targeted/active/modules/100/dbadm
/etc/selinux/targeted/active/modules/100/dbskk
/etc/selinux/targeted/active/modules/100/dbus
/etc/selinux/targeted/active/modules/100/dcc
/etc/selinux/targeted/active/modules/100/ddclient
/etc/selinux/targeted/active/modules/100/denyhosts
/etc/selinux/targeted/active/modules/100/devicekit
/etc/selinux/targeted/active/modules/100/dhcp
/etc/selinux/targeted/active/modules/100/dictd
/etc/selinux/targeted/active/modules/100/dirsrv
/etc/selinux/targeted/active/modules/100/dirsrv-admin
/etc/selinux/targeted/active/modules/100/dmesg
/etc/selinux/targeted/active/modules/100/dmidecode
/etc/selinux/targeted/active/modules/100/dnsmasq
/etc/selinux/targeted/active/modules/100/dnssec
/etc/selinux/targeted/active/modules/100/docker
/etc/selinux/targeted/active/modules/100/dovecot
/etc/selinux/targeted/active/modules/100/drbd
/etc/selinux/targeted/active/modules/100/dspam
/etc/selinux/targeted/active/modules/100/entropyd
/etc/selinux/targeted/active/modules/100/exim
/etc/selinux/targeted/active/modules/100/fail2ban
/etc/selinux/targeted/active/modules/100/fcoe
/etc/selinux/targeted/active/modules/100/fetchmail
/etc/selinux/targeted/active/modules/100/finger
/etc/selinux/targeted/active/modules/100/firewalld
/etc/selinux/targeted/active/modules/100/firewallgui
/etc/selinux/targeted/active/modules/100/firstboot
/etc/selinux/targeted/active/modules/100/fprintd
/etc/selinux/targeted/active/modules/100/freeipmi
/etc/selinux/targeted/active/modules/100/freqset
/etc/selinux/targeted/active/modules/100/fstools
/etc/selinux/targeted/active/modules/100/ftp
/etc/selinux/targeted/active/modules/100/games
/etc/selinux/targeted/active/modules/100/gdomap
/etc/selinux/targeted/active/modules/100/gear
/etc/selinux/targeted/active/modules/100/geoclue
/etc/selinux/targeted/active/modules/100/getty
/etc/selinux/targeted/active/modules/100/git
/etc/selinux/targeted/active/modules/100/gitosis
/etc/selinux/targeted/active/modules/100/glance
/etc/selinux/targeted/active/modules/100/glusterd
/etc/selinux/targeted/active/modules/100/gnome
/etc/selinux/targeted/active/modules/100/gpg
/etc/selinux/targeted/active/modules/100/gpm
/etc/selinux/targeted/active/modules/100/gpsd
/etc/selinux/targeted/active/modules/100/gssproxy
/etc/selinux/targeted/active/modules/100/guest
/etc/selinux/targeted/active/modules/100/hddtemp
/etc/selinux/targeted/active/modules/100/hostname
/etc/selinux/targeted/active/modules/100/hsqldb
/etc/selinux/targeted/active/modules/100/hwloc
/etc/selinux/targeted/active/modules/100/hypervkvp
/etc/selinux/targeted/active/modules/100/icecast
/etc/selinux/targeted/active/modules/100/inetd
/etc/selinux/targeted/active/modules/100/init
/etc/selinux/targeted/active/modules/100/inn
/etc/selinux/targeted/active/modules/100/iodine
/etc/selinux/targeted/active/modules/100/iotop
/etc/selinux/targeted/active/modules/100/ipa
/etc/selinux/targeted/active/modules/100/ipmievd
/etc/selinux/targeted/active/modules/100/ipsec
/etc/selinux/targeted/active/modules/100/iptables
/etc/selinux/targeted/active/modules/100/irc
/etc/selinux/targeted/active/modules/100/irqbalance
/etc/selinux/targeted/active/modules/100/iscsi
/etc/selinux/targeted/active/modules/100/isns
/etc/selinux/targeted/active/modules/100/jabber
/etc/selinux/targeted/active/modules/100/jetty
/etc/selinux/targeted/active/modules/100/jockey
/etc/selinux/targeted/active/modules/100/journalctl
/etc/selinux/targeted/active/modules/100/kdump
/etc/selinux/targeted/active/modules/100/kdumpgui
/etc/selinux/targeted/active/modules/100/keepalived
/etc/selinux/targeted/active/modules/100/kerberos
/etc/selinux/targeted/active/modules/100/keyboardd
/etc/selinux/targeted/active/modules/100/keystone
/etc/selinux/targeted/active/modules/100/kismet
/etc/selinux/targeted/active/modules/100/kmscon
/etc/selinux/targeted/active/modules/100/ksmtuned
/etc/selinux/targeted/active/modules/100/ktalk
/etc/selinux/targeted/active/modules/100/
/etc/selinux/targeted/active/modules/100/ldap
/etc/selinux/targeted/active/modules/100/libraries
/etc/selinux/targeted/active/modules/100/likewise
/etc/selinux/targeted/active/modules/100/linuxptp
/etc/selinux/targeted/active/modules/100/lircd
/etc/selinux/targeted/active/modules/100/livecd
/etc/selinux/targeted/active/modules/100/lldpad
/etc/selinux/targeted/active/modules/100/loadkeys
/etc/selinux/targeted/active/modules/100/locallogin
/etc/selinux/targeted/active/modules/100/lockdev
/etc/selinux/targeted/active/modules/100/logadm
/etc/selinux/targeted/active/modules/100/logging
/etc/selinux/targeted/active/modules/100/logrotate
/etc/selinux/targeted/active/modules/100/logwatch
/etc/selinux/targeted/active/modules/100/lpd
/etc/selinux/targeted/active/modules/100/lsm
/etc/selinux/targeted/active/modules/100/lttng-tools
/etc/selinux/targeted/active/modules/100/lvm
/etc/selinux/targeted/active/modules/100/mock
/etc/selinux/targeted/active/modules/100/mailman
/etc/selinux/targeted/active/modules/100/mailscanner
/etc/selinux/targeted/active/modules/100/man2html
/etc/selinux/targeted/active/modules/100/mandb
/etc/selinux/targeted/active/modules/100/mcelog
/etc/selinux/targeted/active/modules/100/mediawiki
/etc/selinux/targeted/active/modules/100/memcached
/etc/selinux/targeted/active/modules/100/milter
/etc/selinux/targeted/active/modules/100/minidlna
/etc/selinux/targeted/active/modules/100/minissdpd
/etc/selinux/targeted/active/modules/100/mip6d
/etc/selinux/targeted/active/modules/100/mirrormanager
/etc/selinux/targeted/active/modules/100/miscfiles
/etc/selinux/targeted/active/modules/100/modemmanager
/etc/selinux/targeted/active/modules/100/modutils
/etc/selinux/targeted/active/modules/100/mojomojo
/etc/selinux/targeted/active/modules/100/mon_statd
/etc/selinux/targeted/active/modules/100/mongodb
/etc/selinux/targeted/active/modules/100/motion
/etc/selinux/targeted/active/modules/100/mount
/etc/selinux/targeted/active/modules/100/mozilla
/etc/selinux/targeted/active/modules/100/mpd
/etc/selinux/targeted/active/modules/100/mplayer
/etc/selinux/targeted/active/modules/100/mrtg
/etc/selinux/targeted/active/modules/100/mta
/etc/selinux/targeted/active/modules/100/munin
/etc/selinux/targeted/active/modules/100/mysql
/etc/selinux/targeted/active/modules/100/mythtv
/etc/selinux/targeted/active/modules/100/nagios
/etc/selinux/targeted/active/modules/100/namespace
/etc/selinux/targeted/active/modules/100/ncftool
/etc/selinux/targeted/active/modules/100/netlabel
/etc/selinux/targeted/active/modules/100/netutils
/etc/selinux/targeted/active/modules/100/networkmanager
/etc/selinux/targeted/active/modules/100/ninfod
/etc/selinux/targeted/active/modules/100/nis
/etc/selinux/targeted/active/modules/100/nova
/etc/selinux/targeted/active/modules/100/nscd
/etc/selinux/targeted/active/modules/100/nsd
/etc/selinux/targeted/active/modules/100/nslcd
/etc/selinux/targeted/active/modules/100/ntop
/etc/selinux/targeted/active/modules/100/ntp
/etc/selinux/targeted/active/modules/100/numad
/etc/selinux/targeted/active/modules/100/nut
/etc/selinux/targeted/active/modules/100/nx
/etc/selinux/targeted/active/modules/100/obex
/etc/selinux/targeted/active/modules/100/oddjob
/etc/selinux/targeted/active/modules/100/openct
/etc/selinux/targeted/active/modules/100/opendnssec
/etc/selinux/targeted/active/modules/100/openhpid
/etc/selinux/targeted/active/modules/100/openshift
/etc/selinux/targeted/active/modules/100/openshift-origin
/etc/selinux/targeted/active/modules/100/opensm
/etc/selinux/targeted/active/modules/100/open
/etc/selinux/targeted/active/modules/100/openvswitch
/etc/selinux/targeted/active/modules/100/openwsman
/etc/selinux/targeted/active/modules/100/oracleasm
/etc/selinux/targeted/active/modules/100/osad
/etc/selinux/targeted/active/modules/100/pads
/etc/selinux/targeted/active/modules/100/passenger
/etc/selinux/targeted/active/modules/100/pcmcia
/etc/selinux/targeted/active/modules/100/pcp
/etc/selinux/targeted/active/modules/100/pcscd
/etc/selinux/targeted/active/modules/100/pegasus
/etc/selinux/targeted/active/modules/100/permissivedomains
/etc/selinux/targeted/active/modules/100/pesign
/etc/selinux/targeted/active/modules/100/pingd
/etc/selinux/targeted/active/modules/100/piranha
/etc/selinux/targeted/active/modules/100/pkcs
/etc/selinux/targeted/active/modules/100/pki
/etc/selinux/targeted/active/modules/100/plymouthd
/etc/selinux/targeted/active/modules/100/podsleuth
/etc/selinux/targeted/active/modules/100/policykit
/etc/selinux/targeted/active/modules/100/polipo
/etc/selinux/targeted/active/modules/100/portmap
/etc/selinux/targeted/active/modules/100/portreserve
/etc/selinux/targeted/active/modules/100/postfix
/etc/selinux/targeted/active/modules/100/postgresql
/etc/selinux/targeted/active/modules/100/postgrey
/etc/selinux/targeted/active/modules/100/ppp
/etc/selinux/targeted/active/modules/100/prelink
/etc/selinux/targeted/active/modules/100/prelude
/etc/selinux/targeted/active/modules/100/privoxy
/etc/selinux/targeted/active/modules/100/procmail
/etc/selinux/targeted/active/modules/100/prosody
/etc/selinux/targeted/active/modules/100/psad
/etc/selinux/targeted/active/modules/100/ptchown
/etc/selinux/targeted/active/modules/100/publicfile
/etc/selinux/targeted/active/modules/100/pulseaudio
/etc/selinux/targeted/active/modules/100/puppet
/etc/selinux/targeted/active/modules/100/pwauth
/etc/selinux/targeted/active/modules/100/qmail
/etc/selinux/targeted/active/modules/100/qpid
/etc/selinux/targeted/active/modules/100/quantum
/etc/selinux/targeted/active/modules/100/quota
/etc/selinux/targeted/active/modules/100/rabbitmq
/etc/selinux/targeted/active/modules/100/radius
/etc/selinux/targeted/active/modules/100/radvd
/etc/selinux/targeted/active/modules/100/raid
/etc/selinux/targeted/active/modules/100/rasdaemon
/etc/selinux/targeted/active/modules/100/rdisc
/etc/selinux/targeted/active/modules/100/readahead
/etc/selinux/targeted/active/modules/100/realmd
/etc/selinux/targeted/active/modules/100/redis
/etc/selinux/targeted/active/modules/100/remotelogin
/etc/selinux/targeted/active/modules/100/rhcs
/etc/selinux/targeted/active/modules/100/rhev
/etc/selinux/targeted/active/modules/100/rhgb
/etc/selinux/targeted/active/modules/100/rhnsd
/etc/selinux/targeted/active/modules/100/rhsmcertd
/etc/selinux/targeted/active/modules/100/ricci
/etc/selinux/targeted/active/modules/100/rkhunter
/etc/selinux/targeted/active/modules/100/rlogin
/etc/selinux/targeted/active/modules/100/rngd
/etc/selinux/targeted/active/modules/100/roundup
/etc/selinux/targeted/active/modules/100/rpc
/etc/selinux/targeted/active/modules/100/rpcbind
/etc/selinux/targeted/active/modules/100/rpm
/etc/selinux/targeted/active/modules/100/rshd
/etc/selinux/targeted/active/modules/100/rssh
/etc/selinux/targeted/active/modules/100/rsync
/etc/selinux/targeted/active/modules/100/rtas
/etc/selinux/targeted/active/modules/100/rtkit
/etc/selinux/targeted/active/modules/100/rwho
/etc/selinux/targeted/active/modules/100/samba
/etc/selinux/targeted/active/modules/100/sambagui
/etc/selinux/targeted/active/modules/100/sandboxX
/etc/selinux/targeted/active/modules/100/sanlock
/etc/selinux/targeted/active/modules/100/sasl
/etc/selinux/targeted/active/modules/100/sbd
/etc/selinux/targeted/active/modules/100/sblim
/etc/selinux/targeted/active/modules/100/screen
/etc/selinux/targeted/active/modules/100/secadm
/etc/selinux/targeted/active/modules/100/sectoolm
/etc/selinux/targeted/active/modules/100/selinuxutil
/etc/selinux/targeted/active/modules/100/sendmail
/etc/selinux/targeted/active/modules/100/sensord
/etc/selinux/targeted/active/modules/100/setrans
/etc/selinux/targeted/active/modules/100/setroubleshoot
/etc/selinux/targeted/active/modules/100/seunshare
/etc/selinux/targeted/active/modules/100/sge
/etc/selinux/targeted/active/modules/100/shorewall
/etc/selinux/targeted/active/modules/100/slocate
/etc/selinux/targeted/active/modules/100/slpd
/etc/selinux/targeted/active/modules/100/smartmon
/etc/selinux/targeted/active/modules/100/smokeping
/etc/selinux/targeted/active/modules/100/smoltclient
/etc/selinux/targeted/active/modules/100/smsd
/etc/selinux/targeted/active/modules/100/snapper
/etc/selinux/targeted/active/modules/100/snmp
/etc/selinux/targeted/active/modules/100/snort
/etc/selinux/targeted/active/modules/100/sosreport
/etc/selinux/targeted/active/modules/100/soundserver
/etc/selinux/targeted/active/modules/100/spamassassin
/etc/selinux/targeted/active/modules/100/speech-dispatcher
/etc/selinux/targeted/active/modules/100/squid
/etc/selinux/targeted/active/modules/100/ssh
/etc/selinux/targeted/active/modules/100/sssd
/etc/selinux/targeted/active/modules/100/staff
/etc/selinux/targeted/active/modules/100/stapserver
/etc/selinux/targeted/active/modules/100/stunnel
/etc/selinux/targeted/active/modules/100/su
/etc/selinux/targeted/active/modules/100/sudo
/etc/selinux/targeted/active/modules/100/svnserve
/etc/selinux/targeted/active/modules/100/swift
/etc/selinux/targeted/active/modules/100/sysadm
/etc/selinux/targeted/active/modules/100/sysadm_secadm
/etc/selinux/targeted/active/modules/100/sysnetwork
/etc/selinux/targeted/active/modules/100/sysstat
/etc/selinux/targeted/active/modules/100/systemd
/etc/selinux/targeted/active/modules/100/targetd
/etc/selinux/targeted/active/modules/100/tcpd
/etc/selinux/targeted/active/modules/100/tcsd
/etc/selinux/targeted/active/modules/100/telepathy
/etc/selinux/targeted/active/modules/100/telnet
/etc/selinux/targeted/active/modules/100/tftp
/etc/selinux/targeted/active/modules/100/tgtd
/etc/selinux/targeted/active/modules/100/thin
/etc/selinux/targeted/active/modules/100/thumb
/etc/selinux/targeted/active/modules/100/tmpreaper
/etc/selinux/targeted/active/modules/100/tomcat
/etc/selinux/targeted/active/modules/100/tor
/etc/selinux/targeted/active/modules/100/tuned
/etc/selinux/targeted/active/modules/100/tvtime
/etc/selinux/targeted/active/modules/100/udev
/etc/selinux/targeted/active/modules/100/ulogd
/etc/selinux/targeted/active/modules/100/uml
/etc/selinux/targeted/active/modules/100/unconfined
/etc/selinux/targeted/active/modules/100/unconfineduser
/etc/selinux/targeted/active/modules/100/unlabelednet
/etc/selinux/targeted/active/modules/100/unprivuser
/etc/selinux/targeted/active/modules/100/updfstab
/etc/selinux/targeted/active/modules/100/usbmodules
/etc/selinux/targeted/active/modules/100/usbmuxd
/etc/selinux/targeted/active/modules/100/userdomain
/etc/selinux/targeted/active/modules/100/userhelper
/etc/selinux/targeted/active/modules/100/usermanage
/etc/selinux/targeted/active/modules/100/usernetctl
/etc/selinux/targeted/active/modules/100/uucp
/etc/selinux/targeted/active/modules/100/uuidd
/etc/selinux/targeted/active/modules/100/varnishd
/etc/selinux/targeted/active/modules/100/vdagent
/etc/selinux/targeted/active/modules/100/vhostmd
/etc/selinux/targeted/active/modules/100/virt
/etc/selinux/targeted/active/modules/100/vlock
/etc/selinux/targeted/active/modules/100/vmtools
/etc/selinux/targeted/active/modules/100/vmware
/etc/selinux/targeted/active/modules/100/vnstatd
/etc/selinux/targeted/active/modules/100/
/etc/selinux/targeted/active/modules/100/w3c
/etc/selinux/targeted/active/modules/100/watchdog
/etc/selinux/targeted/active/modules/100/wdmd
/etc/selinux/targeted/active/modules/100/webadm
/etc/selinux/targeted/active/modules/100/webalizer
/etc/selinux/targeted/active/modules/100/wine
/etc/selinux/targeted/active/modules/100/wireshark
/etc/selinux/targeted/active/modules/100/xen
/etc/selinux/targeted/active/modules/100/xguest
/etc/selinux/targeted/active/modules/100/xserver
/etc/selinux/targeted/active/modules/100/zabbix
/etc/selinux/targeted/active/modules/100/zarafa
/etc/selinux/targeted/active/modules/100/zebra
/etc/selinux/targeted/active/modules/100/zoneminder
/etc/selinux/targeted/active/modules/100/zosremote
/etc/selinux/targeted/active/modules/disabled
/etc/selinux/targeted/modules
/etc/selinux/targeted/modules/active
/etc/selinux/targeted/modules/active/modules
/etc/selinux/targeted/contexts
/etc/selinux/targeted/contexts/files
/etc/selinux/targeted/contexts/users
/etc/selinux/targeted/logins
/etc/selinux/targeted/policy
/etc/selinux/final
/etc/depmod.d
/etc/dracut.conf.d
/etc/modprobe.d
/etc/binfmt.d
/etc/modules-load.d
/etc/systemd
/etc/systemd/system
/etc/systemd/system/multi-user.target.wants
/etc/systemd/system/getty.target.wants
/etc/systemd/system/default.target.wants
/etc/systemd/system/system-update.target.wants
/etc/systemd/system/sockets.target.wants
/etc/systemd/system/basic.target.wants
/etc/systemd/system/sysinit.target.wants
/etc/systemd/user
/etc/sysctl.d
/etc/profile.d
/etc/rsyslog.d
/etc/tmpfiles.d
/etc/udev
/etc/udev/rules.d
/etc/X11
/etc/X11/applnk
/etc/X11/fontpath.d
/etc/X11/xorg.conf.d
/etc/bash_completion.d
/etc/opt
/etc/pm
/etc/pm/config.d
/etc/pm/power.d
/etc/pm/sleep.d
/etc/skel
/etc/sysconfig
/etc/sysconfig/cbq
/etc/sysconfig/network-scripts
/etc/sysconfig/console
/etc/sysconfig/modules
/etc/xdg
/etc/xdg/autostart
/etc/xdg/systemd
/etc/xinetd.d
/etc/terminfo
/etc/default
/etc/prelink.conf.d
/etc/ld.so.conf.d
/etc/my.cnf.d
/etc/polkit-1
/etc/polkit-1/rules.d
/etc/polkit-1/localauthority
/etc/polkit-1/localauthority/10-vendor.d
/etc/polkit-1/localauthority/20-org.d
/etc/polkit-1/localauthority/30-site.d
/etc/polkit-1/localauthority/50-local.d
/etc/polkit-1/localauthority/90-mandatory.d
/etc/polkit-1/localauthority.conf.d
/etc/cron.weekly
/etc/popt.d
/etc/alternatives
/etc/chkconfig.d
/etc/NetworkManager
/etc/NetworkManager/dispatcher.d
/etc/NetworkManager/dispatcher.d/no-wait.d
/etc/NetworkManager/dispatcher.d/pre-down.d
/etc/NetworkManager/dispatcher.d/pre-up.d
/etc/NetworkManager/VPN
/etc/NetworkManager/conf.d
/etc/NetworkManager/dnsmasq-shared.d
/etc/NetworkManager/dnsmasq.d
/etc/NetworkManager/system-connections
/etc/rc.d
/etc/rc.d/init.d
/etc/rc.d/rc0.d
/etc/rc.d/rc1.d
/etc/rc.d/rc2.d
/etc/rc.d/rc3.d
/etc/rc.d/rc4.d
/etc/rc.d/rc5.d
/etc/rc.d/rc6.d
/etc/ppp
/etc/ppp/peers
/etc/statetab.d
/etc/gcrypt
/etc/libnl
/etc/pkcs11
/etc/pkcs11/modules
/etc/dhcp
/etc/dhcp/dhclient.d
/etc/wpa_supplicant
/etc/logrotate.d
/etc/cron.hourly
/etc/cron.daily
/etc/gss
/etc/gss/mech.d
/etc/cron.d
/etc/krb5.conf.d
/etc/python
/etc/security
/etc/security/console.apps
/etc/security/console.perms.d
/etc/security/limits.d
/etc/security/namespace.d
/etc/pam.d
/etc/rwtab.d
/etc/ssh
/etc/plymouth
/etc/grub.d
/etc/dnsmasq.d
/etc/tuned
/etc/firewalld
/etc/firewalld/icmptypes
/etc/firewalld/services
/etc/firewalld/zones
/etc/postfix
/etc/audisp
/etc/audisp/plugins.d
/etc/audit
/etc/audit/rules.d
/etc/kernel
/etc/kernel/postinst.d
/etc/sudoers.d
.
./.ICE-unix
./.Test-unix
./.XIM-unix
./.font-unix
./.X11-unix
[root@localhost tmp]# find .-ctime-20
find: ‘.-ctime-20’: 没有那个文件或目录
[root@localhost tmp]# find .-ctime -20
find: 未知的断言“-20”
[root@localhost tmp]# find .-ctime -2 0
find: 未知的断言“-2”
[root@localhost tmp]# find . -ctime -2 0
find: 路径必须在表达式之前: 0
用法: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
[root@localhost tmp]# find . -ctime -20
.
./yum.log
./.ICE-unix
./.Test-unix
./.XIM-unix
./.font-unix
./.X11-unix
./ks-script-At5Czm
./imooc.log
./imooc2.log
./mooc
./.mooc.swp
[root@localhost tmp]# find /var/log/ -ctime -7
/var/log/
/var/log/tallylog
/var/log/lastlog
/var/log/wtmp
/var/log/btmp
/var/log/ppp
/var/log/messages
/var/log/secure
/var/log/maillog
/var/log/spooler
/var/log/tuned
/var/log/tuned/tuned.log
/var/log/audit
/var/log/audit/audit.log.1
/var/log/audit/audit.log
/var/log/chrony
/var/log/anaconda
/var/log/anaconda/anaconda.log
/var/log/anaconda/syslog
/var/log/anaconda/X.log
/var/log/anaconda/program.log
/var/log/anaconda/packaging.log
/var/log/anaconda/storage.log
/var/log/anaconda/ifcfg.log
/var/log/anaconda/ks-script-TzEIYb.log
/var/log/anaconda/journal.log
/var/log/rhsm
/var/log/firewalld
/var/log/cron
/var/log/yum.log
/var/log/dmesg.old
/var/log/boot.log
/var/log/dmesg
[root@localhost tmp]# find /var/log/ -mtime -7
/var/log/
/var/log/tallylog
/var/log/lastlog
/var/log/wtmp
/var/log/btmp
/var/log/messages
/var/log/secure
/var/log/maillog
/var/log/spooler
/var/log/tuned
/var/log/tuned/tuned.log
/var/log/audit
/var/log/audit/audit.log.1
/var/log/audit/audit.log
/var/log/anaconda
/var/log/anaconda/anaconda.log
/var/log/anaconda/syslog
/var/log/anaconda/X.log
/var/log/anaconda/program.log
/var/log/anaconda/packaging.log
/var/log/anaconda/storage.log
/var/log/anaconda/ifcfg.log
/var/log/anaconda/ks-script-TzEIYb.log
/var/log/anaconda/journal.log
/var/log/rhsm
/var/log/firewalld
/var/log/cron
/var/log/yum.log
/var/log/dmesg.old
/var/log/boot.log
/var/log/dmesg
[root@localhost tmp]# find /var/log/ -mtime +7
/var/log/ppp
/var/log/chrony
[root@localhost tmp]# find /var/log/ -typr f-mtime +7
find: 未知的断言“-typr”
[root@localhost tmp]# find /var/log/ -type f -mtime +7
[root@localhost tmp]# find /var/log/ -type f -mtime +30
[root@localhost tmp]# find /var/log/ -type f -mtime -30
/var/log/tallylog
/var/log/lastlog
/var/log/wtmp
/var/log/btmp
/var/log/messages
/var/log/secure
/var/log/maillog
/var/log/spooler
/var/log/tuned/tuned.log
/var/log/audit/audit.log.1
/var/log/audit/audit.log
/var/log/anaconda/anaconda.log
/var/log/anaconda/syslog
/var/log/anaconda/X.log
/var/log/anaconda/program.log
/var/log/anaconda/packaging.log
/var/log/anaconda/storage.log
/var/log/anaconda/ifcfg.log
/var/log/anaconda/ks-script-TzEIYb.log
/var/log/anaconda/journal.log
/var/log/firewalld
/var/log/cron
/var/log/yum.log
/var/log/dmesg.old
/var/log/boot.log
/var/log/dmesg
[root@localhost tmp]# find /var/log/ -name "*.log" -type f -mtime -30
/var/log/tuned/tuned.log
/var/log/audit/audit.log
/var/log/anaconda/anaconda.log
/var/log/anaconda/X.log
/var/log/anaconda/program.log
/var/log/anaconda/packaging.log
/var/log/anaconda/storage.log
/var/log/anaconda/ifcfg.log
/var/log/anaconda/ks-script-TzEIYb.log
/var/log/anaconda/journal.log
/var/log/yum.log
/var/log/boot.log
[root@localhost tmp]# cd
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# cd /tmo
-bash: cd: /tmo: 没有那个文件或目录
[root@localhost ~]# cd /tmp
[root@localhost tmp]# ll
总用量 8
-rw-r--r--. 1 root root   0 4月  17 08:32 imooc2.log
-rw-r--r--. 1 root root   0 4月  17 08:32 imooc.log
-rwx------. 1 root root 836 4月  16 06:28 ks-script-At5Czm
-rw-r--r--. 1 root root 188 4月  17 08:37 mooc
-rw-------. 1 root root   0 4月  16 06:22 yum.log
[root@localhost tmp]# find -name "*mooc" -exec rm {}\ 
find: 遗漏“-exec”的参数
[root@localhost tmp]# find -name "*mooc" -exec rm {}\; 
find: 遗漏“-exec”的参数
[root@localhost tmp]# find type -f -name "*mooc" -exec rm {}\; 
find: 未知的断言“-f”
[root@localhost tmp]# find -type f -name "*mooc" -exec rm {} \ 
find: 遗漏“-exec”的参数
[root@localhost tmp]# find -type f -name "*mooc" -exec rm {} \;
[root@localhost tmp]# ll
总用量 4
-rw-r--r--. 1 root root   0 4月  17 08:32 imooc2.log
-rw-r--r--. 1 root root   0 4月  17 08:32 imooc.log
-rwx------. 1 root root 836 4月  16 06:28 ks-script-At5Czm
-rw-------. 1 root root   0 4月  16 06:22 yum.log
[root@localhost tmp]# man -tar
man: 选项需要参数 -- "r"
Try 'man --help' or 'man --usage' for more information.
[root@localhost tmp]# man at
没有 at 的手册页条目
[root@localhost tmp]# man tar
[root@localhost tmp]# touch imooc
[root@localhost tmp]# vim imoocx
[root@localhost tmp]# ll
总用量 8
-rw-r--r--. 1 root root   0 4月  17 09:09 imooc
-rw-r--r--. 1 root root   0 4月  17 08:32 imooc2.log
-rw-r--r--. 1 root root   0 4月  17 08:32 imooc.log
-rw-r--r--. 1 root root 103 4月  17 09:09 imoocx
-rwx------. 1 root root 836 4月  16 06:28 ks-script-At5Czm
-rw-------. 1 root root   0 4月  16 06:22 yum.log
[root@localhost tmp]# tar -cf imooc.tar imoocx
[root@localhost tmp]# ll
总用量 20
-rw-r--r--. 1 root root     0 4月  17 09:09 imooc
-rw-r--r--. 1 root root     0 4月  17 08:32 imooc2.log
-rw-r--r--. 1 root root     0 4月  17 08:32 imooc.log
-rw-r--r--. 1 root root 10240 4月  17 09:09 imooc.tar
-rw-r--r--. 1 root root   103 4月  17 09:09 imoocx
-rwx------. 1 root root   836 4月  16 06:28 ks-script-At5Czm
-rw-------. 1 root root     0 4月  16 06:22 yum.log
[root@localhost tmp]# tar -tf imooc.tar
imoocx
[root@localhost tmp]# tar -tvf imooc.tar
-rw-r--r-- root/root       103 2018-04-17 09:09 imoocx
[root@localhost tmp]# tar -xf imooc.tar
[root@localhost tmp]# ll
总用量 20
-rw-r--r--. 1 root root     0 4月  17 09:09 imooc
-rw-r--r--. 1 root root     0 4月  17 08:32 imooc2.log
-rw-r--r--. 1 root root     0 4月  17 08:32 imooc.log
-rw-r--r--. 1 root root 10240 4月  17 09:09 imooc.tar
-rw-r--r--. 1 root root   103 4月  17 09:09 imoocx
-rwx------. 1 root root   836 4月  16 06:28 ks-script-At5Czm
-rw-------. 1 root root     0 4月  16 06:22 yum.log
[root@localhost tmp]# rm imoocx
rm:是否删除普通文件 "imoocx"?y
[root@localhost tmp]# ll
总用量 16
-rw-r--r--. 1 root root     0 4月  17 09:09 imooc
-rw-r--r--. 1 root root     0 4月  17 08:32 imooc2.log
-rw-r--r--. 1 root root     0 4月  17 08:32 imooc.log
-rw-r--r--. 1 root root 10240 4月  17 09:09 imooc.tar
-rwx------. 1 root root   836 4月  16 06:28 ks-script-At5Czm
-rw-------. 1 root root     0 4月  16 06:22 yum.log
[root@localhost tmp]# tar -xf imooc.tar
[root@localhost tmp]# ll
总用量 20
-rw-r--r--. 1 root root     0 4月  17 09:09 imooc
-rw-r--r--. 1 root root     0 4月  17 08:32 imooc2.log
-rw-r--r--. 1 root root     0 4月  17 08:32 imooc.log
-rw-r--r--. 1 root root 10240 4月  17 09:09 imooc.tar
-rw-r--r--. 1 root root   103 4月  17 09:09 imoocx
-rwx------. 1 root root   836 4月  16 06:28 ks-script-At5Czm
-rw-------. 1 root root     0 4月  16 06:22 yum.log
[root@localhost tmp]# cat imoocx
jfklasffaskdjfkl;asdjflaksdcnaslk;dc 
asdf njklasdfj;kals
asdjfkasd jkla;sdfa
sdfjklasd'ckm'as;dkasd
]
[root@localhost tmp]# tar -cfzv imoocx.tar.gz imoocx
tar: imoocx.tar.gz:无法 stat: 没有那个文件或目录
tar: 由于前次错误,将以上次的错误状态退出
[root@localhost tmp]# tar -cvzf imoocx.tar.gz imoocx
imoocx
[root@localhost tmp]# ll
总用量 36
-rw-r--r--. 1 root root     0 4月  17 09:09 imooc
-rw-r--r--. 1 root root     0 4月  17 08:32 imooc2.log
-rw-r--r--. 1 root root     0 4月  17 08:32 imooc.log
-rw-r--r--. 1 root root 10240 4月  17 09:09 imooc.tar
-rw-r--r--. 1 root root   103 4月  17 09:09 imoocx
-rw-r--r--. 1 root root   185 4月  17 09:11 imoocx.tar.gz
-rwx------. 1 root root   836 4月  16 06:28 ks-script-At5Czm
-rw-------. 1 root root     0 4月  16 06:22 yum.log
-rw-r--r--. 1 root root 10240 4月  17 09:11 zv
[root@localhost tmp]# tar -tzvf imoocx.tar.gz 
-rw-r--r-- root/root       103 2018-04-17 09:09 imoocx
[root@localhost tmp]# rm -f imoocx
[root@localhost tmp]# tar -xzvf imoocx.tar.gz 
imoocx
[root@localhost tmp]# ll
总用量 36
-rw-r--r--. 1 root root     0 4月  17 09:09 imooc
-rw-r--r--. 1 root root     0 4月  17 08:32 imooc2.log
-rw-r--r--. 1 root root     0 4月  17 08:32 imooc.log
-rw-r--r--. 1 root root 10240 4月  17 09:09 imooc.tar
-rw-r--r--. 1 root root   103 4月  17 09:09 imoocx
-rw-r--r--. 1 root root   185 4月  17 09:11 imoocx.tar.gz
-rwx------. 1 root root   836 4月  16 06:28 ks-script-At5Czm
-rw-------. 1 root root     0 4月  16 06:22 yum.log
-rw-r--r--. 1 root root 10240 4月  17 09:11 zv
[root@localhost tmp]# cd /home
[root@localhost home]# useradd imooc
[root@localhost home]# ll
总用量 0
drwx------. 2 imooc imooc 62 4月  17 09:26 imooc
[root@localhost home]# ll /home
总用量 0
drwx------. 2 imooc imooc 62 4月  17 09:26 imooc
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# passwd imooc 123456
passwd:只能指定一个用户的名称。
[root@localhost home]# passwd imooc 
更改用户 imooc 的密码 。
新的 密码:
无效的密码: 密码少于 8 个字符
重新输入新的 密码:
抱歉,密码不匹配。
新的 密码:
无效的密码: 密码未通过字典检查 - 过于简单化/系统化
重新输入新的 密码:
抱歉,密码不匹配。
新的 密码:
无效的密码: 密码未通过字典检查 - 过于简单化/系统化
重新输入新的 密码:
抱歉,密码不匹配。
passwd: 已经超出服务重试的最多次数
[root@localhost home]# 
[root@localhost home]# passwd imooc 
更改用户 imooc 的密码 。
新的 密码:
重新输入新的 密码:
passwd:所有的身份验证令牌已经成功更新。
[root@localhost home]# adduser imooc_test
[root@localhost home]# yum install firewalld
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
正在解决依赖关系
--> 正在检查事务
---> 软件包 firewalld.noarch.0.0.4.3.2-8.el7 将被 升级
---> 软件包 firewalld.noarch.0.0.4.4.4-6.el7 将被 更新
--> 正在处理依赖关系 python-firewall = 0.4.4.4-6.el7,它被软件包 firewalld-0.4.4.4-6.el7.noarch 需要
--> 正在处理依赖关系 firewalld-filesystem = 0.4.4.4-6.el7,它被软件包 firewalld-0.4.4.4-6.el7.noarch 需要
--> 正在检查事务
---> 软件包 firewalld-filesystem.noarch.0.0.4.3.2-8.el7 将被 升级
---> 软件包 firewalld-filesystem.noarch.0.0.4.4.4-6.el7 将被 更新
---> 软件包 python-firewall.noarch.0.0.4.3.2-8.el7 将被 升级
---> 软件包 python-firewall.noarch.0.0.4.4.4-6.el7 将被 更新
--> 处理 firewalld-0.4.4.4-6.el7.noarch 与 selinux-policy < 3.13.1-118.el7 的冲突
--> 正在使用新的信息重新解决依赖关系
--> 正在检查事务
---> 软件包 selinux-policy.noarch.0.3.13.1-102.el7 将被 升级
--> 正在处理依赖关系 selinux-policy = 3.13.1-102.el7,它被软件包 selinux-policy-targeted-3.13.1-102.el7.noarch 需要
--> 正在处理依赖关系 selinux-policy = 3.13.1-102.el7,它被软件包 selinux-policy-targeted-3.13.1-102.el7.noarch 需要
---> 软件包 selinux-policy.noarch.0.3.13.1-166.el7_4.9 将被 更新
--> 正在检查事务
---> 软件包 selinux-policy-targeted.noarch.0.3.13.1-102.el7 将被 升级
---> 软件包 selinux-policy-targeted.noarch.0.3.13.1-166.el7_4.9 将被 更新
--> 解决依赖关系完成

依赖关系解决

================================================================================
 Package                    架构      版本                     源          大小
================================================================================
正在更新:
 firewalld                  noarch    0.4.4.4-6.el7            base       416 k
 selinux-policy             noarch    3.13.1-166.el7_4.9       updates    437 k
为依赖而更新:
 firewalld-filesystem       noarch    0.4.4.4-6.el7            base        47 k
 python-firewall            noarch    0.4.4.4-6.el7            base       325 k
 selinux-policy-targeted    noarch    3.13.1-166.el7_4.9       updates    6.5 M

事务概要
================================================================================
升级  2 软件包 (+3 依赖软件包)

总下载量:7.7 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/5): firewalld-0.4.4.4-6.el7.noarch.rpm                  | 416 kB   00:00     
(2/5): python-firewall-0.4.4.4-6.el7.noarch.rpm            | 325 kB   00:00     
(3/5): selinux-policy-3.13.1-166.el7_4.9.noarch.rpm        | 437 kB   00:00     
(4/5): firewalld-filesystem-0.4.4.4-6.el7.noarch.rpm       |  47 kB   00:01     
(5/5): selinux-policy-targeted-3.13.1-166.el7_4.9.noarch.r | 6.5 MB   00:01     
--------------------------------------------------------------------------------
总计                                               4.8 MB/s | 7.7 MB  00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在更新    : python-firewall-0.4.4.4-6.el7.noarch                       1/10 
  正在更新    : firewalld-filesystem-0.4.4.4-6.el7.noarch                  2/10 
  正在更新    : selinux-policy-3.13.1-166.el7_4.9.noarch                   3/10 
  正在更新    : selinux-policy-targeted-3.13.1-166.el7_4.9.noarch          4/10 
  正在更新    : firewalld-0.4.4.4-6.el7.noarch                             5/10 
  清理        : firewalld-0.4.3.2-8.el7.noarch                             6/10 
  清理        : selinux-policy-targeted-3.13.1-102.el7.noarch              7/10 
  清理        : selinux-policy-3.13.1-102.el7.noarch                       8/10 
  清理        : firewalld-filesystem-0.4.3.2-8.el7.noarch                  9/10 
  清理        : python-firewall-0.4.3.2-8.el7.noarch                      10/10 
  验证中      : selinux-policy-targeted-3.13.1-166.el7_4.9.noarch          1/10 
  验证中      : selinux-policy-3.13.1-166.el7_4.9.noarch                   2/10 
  验证中      : firewalld-0.4.4.4-6.el7.noarch                             3/10 
  验证中      : firewalld-filesystem-0.4.4.4-6.el7.noarch                  4/10 
  验证中      : python-firewall-0.4.4.4-6.el7.noarch                       5/10 
  验证中      : firewalld-filesystem-0.4.3.2-8.el7.noarch                  6/10 
  验证中      : firewalld-0.4.3.2-8.el7.noarch                             7/10 
  验证中      : python-firewall-0.4.3.2-8.el7.noarch                       8/10 
  验证中      : selinux-policy-targeted-3.13.1-102.el7.noarch              9/10 
  验证中      : selinux-policy-3.13.1-102.el7.noarch                      10/10 

更新完毕:
  firewalld.noarch 0:0.4.4.4-6.el7  selinux-policy.noarch 0:3.13.1-166.el7_4.9 

作为依赖被升级:
  firewalld-filesystem.noarch 0:0.4.4.4-6.el7                                   
  python-firewall.noarch 0:0.4.4.4-6.el7                                        
  selinux-policy-targeted.noarch 0:3.13.1-166.el7_4.9                           

完毕!
[root@localhost home]# yum list |grep firewalld
firewalld.noarch                            0.4.4.4-6.el7              @base    
firewalld-filesystem.noarch                 0.4.4.4-6.el7              @base    
[root@localhost home]# ps -ef |grep firewall
root      3376     1  1 09:33 ?        00:00:00 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
root      3481  2199  0 09:33 pts/0    00:00:00 grep --color=auto firewall
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# service firewalld restart
Redirecting to /bin/systemctl restart  firewalld.service
[root@localhost home]# status firewalld
-bash: status: 未找到命令
[root@localhost home]# service firewalld start
Redirecting to /bin/systemctl start  firewalld.service
[root@localhost home]# firewall-cmd --version
0.4.4.4
[root@localhost home]# firewall-cmd --get-zones
block dmz drop external home internal public trusted work
[root@localhost home]# firewall-cmd --get-default-zones
usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: --get-default-zones
[root@localhost home]# firewall-cmd --get-default-zone
public
[root@localhost home]# firewall-cmd --list-all-zones
block
  target: %%REJECT%%
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: 
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


dmz
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: ssh
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


drop
  target: DROP
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: 
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


external
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: ssh
  ports: 
  protocols: 
  masquerade: yes
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


home
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: ssh mdns samba-client dhcpv6-client
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


internal
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: ssh mdns samba-client dhcpv6-client
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


public (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp0s3
  sources: 
  services: dhcpv6-client ssh
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


trusted
  target: ACCEPT
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: 
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


work
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: ssh dhcpv6-client
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# firewall-cmd --zone=public
usage: see firewall-cmd man page
No option specified.
[root@localhost home]# firewall-cmd --list-ports

[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# firewall-cmd --query-service=ssh
yes
[root@localhost home]# firewall-cmd --list-service
dhcpv6-client ssh
[root@localhost home]# firewall-cmd --add-port-22/tcp
usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: --add-port-22/tcp
[root@localhost home]# firewall-cmd --add-port=22/tcp
success
[root@localhost home]# firewall-cmd --list-all-zones
block
  target: %%REJECT%%
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: 
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


dmz
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: ssh
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


drop
  target: DROP
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: 
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


external
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: ssh
  ports: 
  protocols: 
  masquerade: yes
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


home
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: ssh mdns samba-client dhcpv6-client
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


internal
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: ssh mdns samba-client dhcpv6-client
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


public (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp0s3
  sources: 
  services: dhcpv6-client ssh
  ports: 22/tcp
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


trusted
  target: ACCEPT
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: 
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


work
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: ssh dhcpv6-client
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


[root@localhost home]# firewall-cmd --list-all-ports
usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: --list-all-ports
[root@localhost home]# firewall-cmd --remove-port=22/tcp
success
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# sudo
usage: sudo [-D level] -h | -K | -k | -V
usage: sudo -v [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-u user
            name|#uid]
usage: sudo -l[l] [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-U user
            name] [-u user name|#uid] [-g groupname|#gid] [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C fd] [-D level] [-g
            groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid]
            [VAR=value] [-i|-s] []
usage: sudo -e [-AknS] [-r role] [-t type] [-C fd] [-D level] [-g
            groupname|#gid] [-p prompt] [-u user name|#uid] file ...
[root@localhost home]# sudo yum install-updage
已加载插件:fastestmirror
没有该命令:install-updage。请使用 /bin/yum --help
[root@localhost home]# sudo yum install-update
已加载插件:fastestmirror
没有该命令:install-update。请使用 /bin/yum --help
[root@localhost home]# sudo yum install
已加载插件:fastestmirror
错误:需要为 install 指定软件包列表
简单用法:

install 软件包……

向系统中安装一个或多个软件包

别名:install-n, install-na, install-nevra
[root@localhost home]# cd /home
[root@localhost home]# ll
总用量 0
drwx------. 2 imooc      imooc      62 4月  17 09:26 imooc
drwx------. 2 imooc_test imooc_test 62 4月  17 09:29 imooc_test
[root@localhost home]# 
您在 /var/spool/mail/root 中有邮件
[root@localhost home]# 
[root@localhost home]# 
[root@localhost home]# cd
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# cd /tmp
[root@localhost tmp]# wget http://www.baidu.com
--2018-04-17 09:47:33--  http://www.baidu.com/
正在解析主机 www.baidu.com (www.baidu.com)... 180.97.33.107, 180.97.33.108
正在连接 www.baidu.com (www.baidu.com)|180.97.33.107|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:2381 (2.3K) [text/html]
正在保存至: “index.html”

100%[======================================>] 2,381       --.-K/s 用时 0s      

2018-04-17 09:47:33 (266 MB/s) - 已保存 “index.html” [2381/2381])

[root@localhost tmp]# curl -o sina http://www.sina.com
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   178  100   178    0     0   5469      0 --:--:-- --:--:-- --:--:--  5562
[root@localhost tmp]# 
[root@localhost tmp]# 
[root@localhost tmp]# 
[root@localhost tmp]# 
[root@localhost tmp]# ls
imooc       imooc.log  imoocx         index.html        sina     zv
imooc2.log  imooc.tar  imoocx.tar.gz  ks-script-At5Czm  yum.log
[root@localhost tmp]# 
Last login: Tue Apr 17 20:10:53 on ttys000
zhangyunchendeMacBook-Pro:~ zhangyunchen$ ssh imooc@192.168.0.114
imooc@192.168.0.114's password: 
[imooc@localhost ~]$ cd ~
[imooc@localhost ~]$ ll
总用量 0
[imooc@localhost ~]$ ls
[imooc@localhost ~]$ cd /home
[imooc@localhost home]$ ll
总用量 0
drwx------. 2 imooc imooc 62 4月  17 09:26 imooc
[imooc@localhost home]$ cd ~
[imooc@localhost ~]$ pwd
/home/imooc
[imooc@localhost ~]$ ll
总用量 0
[imooc@localhost ~]$ cd ~/imooc_test
-bash: cd: /home/imooc/imooc_test: 没有那个文件或目录
[imooc@localhost ~]$ cd ./imooc_test
-bash: cd: ./imooc_test: 没有那个文件或目录
[imooc@localhost ~]$ cd imooc_test
-bash: cd: imooc_test: 没有那个文件或目录
[imooc@localhost ~]$ ls -al
总用量 12
drwx------. 2 imooc imooc  62 4月  17 09:26 .
drwxr-xr-x. 4 root  root   37 417 09:29 ..
-rw-r--r--. 1 imooc imooc  18 8月   2 2016 .bash_logout
-rw-r--r--. 1 imooc imooc 193 8月   2 2016 .bash_profile
-rw-r--r--. 1 imooc imooc 231 8月   2 2016 .bashrc
[imooc@localhost ~]$ 
[imooc@localhost ~]$ 
[imooc@localhost ~]$ 
[imooc@localhost ~]$ 
[imooc@localhost ~]$ 
[imooc@localhost ~]$ sudo 
usage: sudo [-D level] -h | -K | -k | -V
usage: sudo -v [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-u user
            name|#uid]
usage: sudo -l[l] [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-U user
            name] [-u user name|#uid] [-g groupname|#gid] [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C fd] [-D level] [-g
            groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid]
            [VAR=value] [-i|-s] []
usage: sudo -e [-AknS] [-r role] [-t type] [-C fd] [-D level] [-g
            groupname|#gid] [-p prompt] [-u user name|#uid] file ...
[imooc@localhost ~]$ su
密码:
[root@localhost imooc]# visu
bash: visu: 未找到命令
[root@localhost imooc]# exit
exit
[imooc@localhost ~]$ sudo yum install vim

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for imooc: 
Sorry, try again.
[sudo] password for imooc: 
Sorry, try again.
[sudo] password for imooc: 
imooc 不在 sudoers 文件中。此事将被报告。
[imooc@localhost ~]$ exit
登出
Connection to 192.168.0.114 closed.
zhangyunchendeMacBook-Pro:~ zhangyunchen$ 
zhangyunchendeMacBook-Pro:~ zhangyunchen$ 
zhangyunchendeMacBook-Pro:~ zhangyunchen$ 
zhangyunchendeMacBook-Pro:~ zhangyunchen$ 
zhangyunchendeMacBook-Pro:~ zhangyunchen$ 
zhangyunchendeMacBook-Pro:~ zhangyunchen$ 
zhangyunchendeMacBook-Pro:~ zhangyunchen$ 
zhangyunchendeMacBook-Pro:~ zhangyunchen$ 
zhangyunchendeMacBook-Pro:~ zhangyunchen$ scp imooc@192.168.0.114 ./tmp/imoocx.tar.gz ./
cp: imooc@192.168.0.114: No such file or directory
cp: ./tmp/imoocx.tar.gz: No such file or directory
zhangyunchendeMacBook-Pro:~ zhangyunchen$ scp imooc@192.168.0.114 /tmp/imoocx.tar.gz ./
cp: imooc@192.168.0.114: No such file or directory
cp: /tmp/imoocx.tar.gz: No such file or directory
zhangyunchendeMacBook-Pro:~ zhangyunchen$ ssh imooc@192.168.0.114
imooc@192.168.0.114's password: 
Last login: Tue Apr 17 09:28:11 2018 from 192.168.0.155
[imooc@localhost ~]$ scp imooc@192.168.0.114 /tmp/imoocx.tar.gz ./
cp: 无法获取"[email protected]" 的文件状态(stat): 没有那个文件或目录
[imooc@localhost ~]$ scp imooc@192.168.0.114:/tmp/imoocx.tar.gz ./
The authenticity of host '192.168.0.114 (192.168.0.114)' can't be established.
ECDSA key fingerprint is d5:2e:e3:c8:9c:09:b0:8e:e0:ae:4a:2d:41:7a:75:89.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.114' (ECDSA) to the list of known hosts.
imooc@192.168.0.114's password: 
imoocx.tar.gz                                 100%  185     0.2KB/s   00:00    
[imooc@localhost ~]$ 

你可能感兴趣的:(程序生活,个人技能)