zoukankan      html  css  js  c++  java
  • linux常用命令

    目录

    •  防火墙命令
    • 权限

    防火墙命令

    service iptables start 打开防火墙

    service iptables stop 关闭防火墙

    service iptables status 查看防火墙状态

    systemctl start iptables.service  启动防火墙

    systemctl stop iptables.service  关闭防火墙

    systemctl restart iptables.service  重启防火墙

    systemctl status iptables.service  显示防火墙的状态

    systemctl enable iptables.service   在开机时启用防火墙

    systemctl disable iptables.service     在开机时禁用防火墙

    systemctl is-enabled iptables.service    查看防火墙是否开机启动

    systemctl list-unit-files|grep enabled     查看已启动的服务列表

    systemctl --failed  查看启动失败的服务列表

     权限

    -rw-r--r-- 1 root root 0 Mar 18 10:51 a.txt

    权限信息:10位

    • 第1位:文件类型
      • -:普通文件
      • d:目录
      • l:软链接
      • b:设备
    • 第2-4位:属主的权限(r:读,w:写,x:执行)
    • 第5-7位:属组的权限
    • 第8-10位:其他人的权限
    -rw------- (600) 只有拥有者有读写权限。
    -rw-r--r-- (644) 只有拥有者有读写权限;而属组用户和其他用户只有读权限。
    -rwx------ (700) 只有拥有者有读、写、执行权限。
    -rwxr-xr-x (755) 拥有者有读、写、执行权限;而属组用户和其他用户只有读、执行权限。
    -rwx--x--x (711) 拥有者有读、写、执行权限;而属组用户和其他用户只有执行权限。
    -rw-rw-rw- (666) 所有用户都有文件读、写权限。
    -rwxrwxrwx (777) 所有用户都有读、写、执行权限。

     归档打包解包

    参数:c:创建   v:显示过程    f:文件名称    t:查看归档的文件   x:释放归档文件  C:指定存放目录   z:压缩需要gzip

    .tar后缀文件

      tar -cvf test.tar 打包

      tar -xvf test.tar 解包

      tar -xf test.tar -C 目录 ----x:释放归档文件 C:指定存放目录

    .tar.gz后缀文件

           tar -zxvf test.tar 解压解包

        tar -cxvf test.tar 压缩打包

  • 相关阅读:
    Centos6.5下本地yum源及局域网yum源配置
    计算机网络之应用层_part -3
    计算机网络之应用层_part -2
    计算机网络之应用层_part -1
    LeetCode-Minimum Path Sum[dp]
    LeetCode-Interleaving String[dp]
    LeetCode-Best Time to Buy and Sell Stock III[dp]
    LeetCode-Palindrome Partitioning II[dp]
    用hexo + github 快速搭建个人博客,由于刚搭建好,有点小激动,就分享下,不好的地方还请指出,谢谢
    搭建node.js 本地服务器
  • 原文地址:https://www.cnblogs.com/shuzhixia/p/14554038.html
Copyright © 2011-2022 走看看