Trying to remove a file to trash that is locked?

Asked by immortal321

Hi - I just started using ubuntu. After a few initial problems and learning troubles I've come to find I love it!

But, when I first started I apparently installed a Java app to my desktop with terminal. I immediately tried to delete it, but it shows a lock above the folder. And every time I try to remove to trash I get an error saying I cannot move to trash because I do not have permissions to change it or its parent folder. I have since learned the easier way to install files, and have installed this same package in the correct location. And for aesthetic reasons, I would like to know how to remove this folder from my desktop.

If it helps I'm using ubuntu 7.10, and the folder in question is titled jre1.6.0_03.

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Gilbert Mendoza
Solved:
Last query:
Last reply:
Revision history for this message
Best Gilbert Mendoza (gmendoza) said :
#1

Greets. Should be easy to resolve.

From a terminal again, display and reset the permissions on the file/folder: (Applications -> Accessories -> Terminal).

I created a sample directory and file that have permissions on them.
$ ls -l ~/Desktop
drwx------ 2 root root 4096 2008-01-02 20:08 locked-dir
-rwx------ 1 root root 0 2008-01-02 20:05 samplefile

To remove the directory "locked-dir" on my desktop, the command would be:
$ sudo rm -r ~/Desktop/locked-dir
Notice the "-r". This is recursive, so it will delete any file/folder beneath the parent directory that you are deleting.

To remove the file "samplefile" on my desktop, the command would be:
$ sudo rm ~/Desktop/samplefile
Notice, there is no "-r" necessary, as it is just a file you are deleting.

Please post if you continue to have issues.

Revision history for this message
immortal321 (immortal321) said :
#2

Thanks Gilbert Mendoza, that solved my question.