zoukankan      html  css  js  c++  java
  • Linux_day01_primaryCommand

    ----------------------------------------

    ls           //list

        ls -la    //long all    ll

    drwxr-xr-x        //directory 

    ----------------------------------------

    file  a.txt     

    ----------------------------------------

    cd            //change directory

    ----------------------------------------

    midir        //make directory

    -------------------------------------------

    pwd         //print word directory

    -------------------------------------------

    touch   a.txt      //creat file

    -------------------------------------------

    cp test2 test3        //copy

      cp "*.txt" dir2        

      cd mydir/

        cp -r ../mydir  ../mydir2  //copy -recursive

    ------------------------------------------

    mv test2.txt b.txt         //rename move

    ------------------------------------------

    rmdir             //remove directory

    -------------------------------------------

    rm             //remove

      rm -r             //remove recursive 

      rm -rf            //remove recursive force

    -------------------------------------------

    echo  "Hi"     

    echo "hi">a.txt     

    echo "hi,hello">>a.txt

    ------------------------------------------

    tree mydir

    ------------------------------------------

    tar -v                 //verbose

    tar -cf                   //create file

    tar -xvf                  //exclude

      tar -cf  1.tar  a.txt b.txt

      tar -cvf  md.tar mydir

    tar -xvf md.tar

    tar -cvfz  a.tar.gz    a.txt b.txt

    ------------------------------------------  

    chmod  777  b.txt

    chmod 755 b.txt

    chmod u-r b.txt        //user    rwxrwxrwx -->  -wxrwxrwx

    chmod a=x b.txt         //all     rwxrwxrwx ---> --x--x--x   111

    chmod g+w b.txt         //group rwxr-xrwx---> rwxrwxrwx

    chmod o-x b.txt         //other  rwxrwxrwx---> rwxrwxrw-  

    ------------------------------------------

    mount  /dev/cdrom  /mnt/cdr    //将光驱中的内容 以目录的形式挂载到 /mnt/cdr中

    umount  /dev/cdrom        //卸载

    ------------------------------------------

    ifconfig    //interface configeration

    ------------------------------------------

    setup             //改变地址之后  (修改配置文件) 要重新启动服务

    ------------------------------------------

    service network restart  //start stop restart status

    ------------------------------------------

    ping 192.168.1.200    //ping不通: 1.防火墙  2.桥接模式 3.network重启 

    ------------------------------------------

    rpm -ivh  telnet-server-0.17-38.e15.i386.rpm    //install verbose horizontal

        Failed dependencies: xinetd is need by telnet-server-0.17-38.e15.i386.rpm

    rpm -ivh  xinetd-2.3.14-10.e15.i386.rpm

      service xinetd restart 

      service xinetd status

  • 相关阅读:
    《Linux系统free命令的使用》学习笔记
    《postfix MAIL服务搭建(第一篇):》RHEL6
    RHEL(RedHat Enterprise Linux)5/6 ISO镜像下载
    《samba搭建win客户端和linux客户端的区别》
    《怎样实现通过shell脚本将用户踢出系统》
    《DDNS服务器的搭建和案例解决方法》
    《Usermod:user lee is currently logged in 家目录不能改变解决方法》
    你们看不懂为什么写这个博客吧
    JS几种数组遍历方式以及性能分析对比
    从概念到业务来看 To B 和 To C 产品区别在哪?
  • 原文地址:https://www.cnblogs.com/siyi/p/4816557.html
Copyright © 2011-2022 走看看