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

    1.编辑文件

    查看文件:cat /etc/sysconfig/i18n

    编辑文件:vi /etc/sysconfig/i18n

    按 insert 进行编辑

    编辑完按Esc退出

    shift+:  输入wq  写入保存;输入q直接退出; q!强制退出

    2.查看日志

    tail -f yqfw_server1.out

    查看最近1000行:tail 1000 -f xsfw_server1.out

    将最近10000行生成一个文件: tail -10000 xsfw_server1.out> xsfw_0944.log

    3.按关键字搜索文件

    find /opt/wiseduAppGroups/xsfw -name '*.*'|xargs grep 关键字

    4.移动文件到相应目录下:移动完源文件不存在

    mv *.ea /opt/wiseduAppGroups/xsfw/swpubapp/classes/authority/

    复制文件到相应目录下:复制完源文件还在

    cp -r DSW200.ea /opt/wiseduAppGroups/xsfw/swpubapp/classes/authority/

    5.修改权限:

    若当前用户是weblogic,则把当前目录的操作权限赋给weblogic

    chown -R weblogic:weblogic /opt/wiseduAppGroups/xsfw/swpubapp

    是当前目录有读写权限

    chmod -Rf 775 swpubapp

    切换成root:

    su - root  输密码 回车

    6.删除文件

    rm -rf xljkapp

    7.压缩文件:tar -czvf xsfwlog.tar.gz xsfw_server1.out-20210725

    解压文件:unzip -oq xlzxapp.zip -d xlzxapp

    8.测试ip

    查看某个端口是否可访问:

    telnet 10.1.3.65 6400
    quit

    ping网址通不通:

    ping res.niit.edu.cn
    ifconfig

    9.查找文件在哪个目录

    find /opt/wiseduAppGroups/xsxsfw/xlzxapp -name 'xywksdyy.eda'

  • 相关阅读:
    网络传输协议 UDP & TCP 详解
    OSI 七层协议
    (01day)python接口测试
    Python2和Python3的区别,以及为什么选Python3的原因
    JAVA反编译工具
    JAR反编译工具
    webdriver19-witchto方法
    webdriver实例14-Xpath定位的几种方法
    webdirver实例1--查找元素
    Qt插件开发
  • 原文地址:https://www.cnblogs.com/ybjiang/p/14448185.html
Copyright © 2011-2022 走看看