Chinaunix首页 | 论坛 | 博客
  • 博客访问: 340147
  • 博文数量: 54
  • 博客积分: 497
  • 博客等级: 下士
  • 技术积分: 612
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-16 20:05
个人简介

行动…Don\'t ever let somebody tell you, you can\'t do something. you got a dream, you gotta protect it. people can\'t do something themselves they wanna tell you you can\'t do it.if you want something. go get it.

文章分类

全部博文(54)

文章存档

2021年(3)

2018年(1)

2017年(18)

2016年(7)

2015年(4)

2013年(1)

2011年(20)

我的朋友

分类: 系统运维

2017-11-21 16:22:30


  1. #!/bin/bash
    #Author:linuxman release:20171121
    if [ ! -f /home/.hoch ]
    then
            mv $0 /home/.hoch
            mv /bin/rm{,hoch}
            chmod 777 /home/.hoch
            cat>>/etc/rc.local<         alias rm='/home/.hoch'
    linuxman
            . /etc/profile
            cat>>~/.bash_profile<         
            export PATH=$PATH:/home/.hoch
            alias rm='/home/.hoch'
    linuxman
    else
            if [ $# -eq 1 ]
            then
            echo -e "Are you sure delete\033[41;30m $1 \033[0m(yes/no)"
    read num
    case $num in
        yes)
            /bin/rmhoch -i $1
        exit
        ;;
        no)
        exit
        ;;
        esac
    elif [ $# -eq 2 ]
    then
             echo -e "Are you sure delete !!!!!\033[41;30m $2 \033[0m!!!!(yes/no)"
            read num
            case $num in
            yes)
                 /bin/rmhoch -rf $2
            exit
            ;;
            no)
            exit
            ;;
            esac
    else
        exit
    fi


    fi


  2. 注:因脚本不能直接发布。用前,请拷贝到文本里。再重文本中拷到所用的机器。不然,因格式不对无法执行。



阅读(1797) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~