Simple Question

Hidden Gekko

3 Years and 100 Posts 0_o
I'm trying to delete some troublesome files with the terminal. I've typed in sudo -s, then my password, but i forgot what to put for the root# ...i really don't use Unix commands often so I just need to know what to do next. Thx :)
 
Assuming your in the directory that contains the files you wish to remove.

(The "$" represents your prompt and the file name you want to remove happens to be testFILE.txt).

Code:
$ su rm "testFILE.txt" -r

That should get you this prompt:

Code:
$ password:

Enter your password. That should remove those pesky files. :D
 
I'm just not an expert at these things. I'm logged in as an admin. I've asked this one time before. I just need to know what to put in root# when i do the following :
Last login: Thu Nov 21 14:10:39 on ttyp1
Welcome to Darwin!
[Gekkos-Computer:~] gekko% sudo -s
Password:
[Gekkos-Computer:~] root# (?)

Ya im a dunce...Thx for helping but I tried what you said, Dan, and i just got permisson denied...
 
You might be entering the wrong password.

You might also need to enable the root user, if you haven't done that.

Do a search on this site for "Root User" and you will find directions on how to enable the account.

If you have problems finding it, let me know and I'll walk you through it.

You need the "root account" activated to use the "su" command.
 
Hidden Gekko, according to your paste from the terminal you do get a root prompt, so the rest is simple.

So if you want to delete the file just type "rm filename" (rm stands for ReMove) at the root# prompt.

Read on for a little more info:
When you type "sudo -s", it's essentially the same as typing "su", but they are slightly different:

"sudo -s" The password is YOUR password.
"su" The password is ROOT'S password.

su stands for Switch User, and without arguments it assumes "su root". With su you can switch to any user, provided you know their password.

"sudo" stands for SuperUser DO (do something as super-user, or root). So really, you should be entering "sudo rm filename" instead of going into the root# prompt with "sudo -s". Remember, with "sudo" you enter YOUR password, not the root password.

Hope this helps.
 
Thats what I was lookin for. Thx alot :)

I never got used to coding and terminal commands, but at least I know somethin now...
 
Back
Top