Thursday, 31 July 2008

Howto: trash files from other partitions into 'bin' on Ubuntu

When you want to delete some files from another partition which is mounted, ubuntu will prompt you warns dialog, saying "Cannot move file to the Deleted Items folder, do you want to delete permanently?".

I always worried if I delete some files by impulse, because such kind of thing was done by me on Windows.

For example, I am used to create a separate partition for '/usr/local' to install some third party big programs.

cross@crossphoto:~$ cd /usr/local/
cross@crossphoto:/usr/local$ sudo mkdir .Trash-1000
cross@crossphoto:/usr/local$ sudo chown cross:root .Trash-1000/

Now /usr/local just like my 'home' folders, if I delete something, I can find them in the 'deleted items'.

When other partitions are mounted by the boot, actually they are mounted by the user 'root'. So you, the current user, have no permission to move anything to other folder-bin on that partition.
So create one for yourself, and using sudo to give you the permission to 'write' in that folder. Done.

No comments:

My photo
London, United Kingdom

Facebook & Twitter