(1)使用trash-cli:
这个软件是在命令行下操作回收站(其目录是~/.local/share/Trash/files).
安装(fedora14中):yum -y install trash-cli
使用方法:(http://code.google.com/p/trash-cli/)
To remove move foo in the trash can, use
$ trash-put foo
To list all the contents of the trashcan
$ trash-list
2007-08-30 12:36:00 /home/andrea/foo
2007-08-30 12:39:41 /home/andrea/bar
2007-08-30 12:39:41 /home/andrea/bar2
2007-08-30 12:39:41 /home/andrea/foo
Search for a specific file in the trashcan
$ trash-list | grep foo
2007-08-30 12:36:00 /home/andrea/foo
2007-08-30 12:39:41 /home/andrea/foo
To restore a trashed file
$ trash-restore
0 2007-08-30 12:36:00 /home/andrea/foo
1 2007-08-30 12:39:41 /home/andrea/bar
2 2007-08-30 12:39:41 /home/andrea/bar2
3 2007-08-30 12:39:41 /home/andrea/foo2
4 2007-08-30 12:39:41 /home/andrea/foo
What file to restore [0..4]: 4
$ ls foo
foo
To remove all trashed files
$ trash-empty
To remove files that have been in the trash more than a given number of days
$ trash-empty <days>
For example
$ date
Tue Feb 19 20:26:52 CET 2008
$ trash-list
2008-02-19 20:11:34 /home/einar/today
2008-02-18 20:11:34 /home/einar/yesterday
2008-02-10 20:11:34 /home/einar/last_week
$ trash-empty 7
$ trash-list
2008-02-19 20:11:34 /home/einar/today
2008-02-18 20:11:34 /home/einar/yesterday
$ trash-empty 1
$ trash-list
2008-02-19 20:11:34 /home/einar/today
http://www.unix.com/man-page/OpenSolaris/1/gvfs-trash/
gvfs-trash命令却可以将文件送到回收站。
可以使用"gvfs-trash 文件路径"将文件删除
alias del='mv -t ~/.local/share/Trash/files --backup=t'
删除成功的文件会放入系统回收站中,位置:~/.local/share/Trash/files
这个软件是在命令行下操作回收站(其目录是~/.local/share/Trash/files).
安装(fedora14中):yum -y install trash-cli
使用方法:(http://code.google.com/p/trash-cli/)
To remove move foo in the trash can, use
$ trash-put foo
To list all the contents of the trashcan
$ trash-list
2007-08-30 12:36:00 /home/andrea/foo
2007-08-30 12:39:41 /home/andrea/bar
2007-08-30 12:39:41 /home/andrea/bar2
2007-08-30 12:39:41 /home/andrea/foo
Search for a specific file in the trashcan
$ trash-list | grep foo
2007-08-30 12:36:00 /home/andrea/foo
2007-08-30 12:39:41 /home/andrea/foo
To restore a trashed file
$ trash-restore
0 2007-08-30 12:36:00 /home/andrea/foo
1 2007-08-30 12:39:41 /home/andrea/bar
2 2007-08-30 12:39:41 /home/andrea/bar2
3 2007-08-30 12:39:41 /home/andrea/foo2
4 2007-08-30 12:39:41 /home/andrea/foo
What file to restore [0..4]: 4
$ ls foo
foo
To remove all trashed files
$ trash-empty
To remove files that have been in the trash more than a given number of days
$ trash-empty <days>
For example
$ date
Tue Feb 19 20:26:52 CET 2008
$ trash-list
2008-02-19 20:11:34 /home/einar/today
2008-02-18 20:11:34 /home/einar/yesterday
2008-02-10 20:11:34 /home/einar/last_week
$ trash-empty 7
$ trash-list
2008-02-19 20:11:34 /home/einar/today
2008-02-18 20:11:34 /home/einar/yesterday
$ trash-empty 1
$ trash-list
2008-02-19 20:11:34 /home/einar/today
注意:如果要恢复一个文件, 必须到当时删除的目录中去使用trash-restore命令
http://www.unix.com/man-page/OpenSolaris/1/gvfs-trash/
gvfs-trash命令却可以将文件送到回收站。
可以使用"gvfs-trash 文件路径"将文件删除
用alias del=gvfs-trash 可以建立别名.
alias del='mv -t ~/.local/share/Trash/files --backup=t'
删除成功的文件会放入系统回收站中,位置:~/.local/share/Trash/files