天天看點

用shell小腳本删除程式

    以前在linux下很擔心删除程式不能夠完全,現在學了些shell小腳本,再也不用為這擔心了,^_^

   [root@centos~] # echo -e '#!/bin/bash\nfor I in `locate totem`;do\nsudo   rm -rf $I\ndone' >remove.sh 

   [root@centos~] #bash remove.sh

  注:totem為我想解除安裝totem播放器,因為它太扯淡了,需要安裝很多插件,是以強力删除。根據自己的需要可随意修改,但更改時要細心,有些軟體可能有關聯,你解除安裝掉某個軟體後,可能另一個也會受到影響,故關鍵字的設定要想好。

   [root@centos~]#rm -f remove.sh  (删掉shell腳本檔案)

本文轉自 劉園  51CTO部落格,原文連結:http://blog.51cto.com/colynn/997794

繼續閱讀