Deleting an accidently created file in root location?

Asked by Simon Cahill

Hello, community!

I'm devving for Android, and as some of you know, I need to setup USB access rights... (file.rules)

Well, I accindently created a folder, named 51-android.rules instead of a file named 51-android.rules
so I'm fustrated... I can't delete the folder -.-" And, can someone also tell me, how to use the su command? I'm new to Ubuntu ^^

LG Simon

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu nautilus Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Barry Drake (b-drake) said :
#1

The quick and easy way might be to use a root file browser. Do gksudo nautilus and you can browse to the root of the filesystem and should be able to delete from there. If not, take a look at the directory's permissions and alter if needed.

Revision history for this message
James Plate (james-plate-deactivatedaccount) said :
#2

For an individual command like removing that folder you created sudo would be used.

sudo rm -r /path/to/your/directory

If you wish to have a login shell session with root privleges you can use sudo -i, either with a command or without.

The preferred method of starting graphical applications with root privleges is gksudo(gnome) or kdesudo(kde)

The use of su and setting a root password is discouraged in ubuntu. (some will suggest using 'sudo su', the above 'sudo -i' is the recommended method).

man sudo - even a quick browse through the man page will answer a number of questions about the uses.

Hope this helps.

Can you help with this problem?

Provide an answer of your own, or ask Simon Cahill for more information if necessary.

To post a message you must log in.