常用的linux命令

来源:互联网 发布:淘宝详情页尺寸790 编辑:程序博客网 时间:2024/06/07 07:20

在linux上部署项目的时候,常用的linux命令:


    cd 进入目录
    ll(ls)    全部文件
    ri    修改文件  desc  q  w
    cat  查看文件
    sz    下载
    rz    上传
    ps  -ef|grep tomcat |grep 用户名  (查询用户下的进程)
    lill  -9  进程ID (杀死该进程)
    tail  -f catalina.out   (在logs中实时查出输出)  tail -100 catalina.out 打印控制台100行
    vi    新建文件( Esc  + shift + : 退出保存)
    vi    已有文件( 按i进入编辑模式,按Esc 然后shift+:调出服务台,qi不保存退出,qw保存退出)
    mkdir 新建文件夹(mkdir aa)
    cp  aa.txt bb.txt (复制)
    mv 剪切;
    tar vxf T+N.tar (解压tar格式)
    
    imp sccphh/oracle@cleardb file=sccpuser.dmp full = y ignore=y
    
    exp sccpuser/sccpuser@cleardb file=sccpuser.dmp owner=(sccpuser)
    
    exp sccpuser/sccpuser@cleardb file=sccpuser.dmp full = y;
    
    exp system/manager@TEST file=d:daochu.dmp owner=(system,sys)
    linux 定时任务:
    赋权限:chmod +x /home/oracle/hh/exp_sccp_db.sh
    crontab -e
    00 21 * * * /home/oracle/hh/exp_sccp_db.sh   --(9点执行这个sh的命令)
    #00 21 * * * /home/oracle/hh/exp_sccp_db.sh   --(9点执行这个sh的命令) 被注释掉,不执行
文件批量大小写转换:

mv  aaa.txt AAA.TXT (将文件名由小写转成大写)

0 0
原创粉丝点击