KEEP K.I.S.S.

tk's blog

KDE 命令行删除文件到回收站脚本

tk posted @ Sep 17, 2011 05:24:13 PM in 业余 with tags linux kde shell trash , 2934 阅读

 

#!/bin/bash
for fileName in "$@"
do
    if [ ! -e $fileName ];then
        echo "****  $fileName  NOT existed!"
        exit
    fi
    kioclient move "$fileName" trash:/ 2> /dev/null && echo "----  trashed:   $fileName"
done

经过测试,暂时没有什么问题,我的环境是 Debian 6.0 KDE。 这个脚本仅限KDE环境。
可以把这个脚本丢到 /usr/local/bin/ 下,作为常用命令使用,不要忘了赋予执行权限。

 

jsimitseo 说:
Feb 01, 2024 10:13:24 PM

I am checking for and I have to post a remark that "The substance of your post is excellent" Great work!  concierge doctor naples


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter