Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UNIX/Console question
#1
While in the console (black back, white type - command s @ startup), how does someone login or gain administration abilities? I can see a director I need to rm or delete, but it says read only. It's my computer, but if I type my login and password at the prompts it tells me my login is incorrect (the one I use when I boot the computer up into OSX).

If I try to mount the disk from the console, I get a kernel panic (has to do with a situation I describe in an earlier thread: http://forums.macresource.com/read/1/282679

I know whacking things from the console can be dangerous, but I am left with no other option. I just need to know how to gain the privilege of whacking. Thanks everyone.
Reply
#2
What are you trying to accomplish?
Reply
#3
a file 'corrupted' while decoding overnight and grew to such a size as to overtake all free space. The drive will not boot up now, because it doesn't have enough free space "to think". My goal is to either A) delete the oversized file (or it's directory if need be) or b) delete enough (known) files as to create breathing room for the system.
Reply
#4
Alright.


After you get into single user mode, as it says, run the scripts it says to mount the hard drive in read right, after that you should be set.
Reply
#5
that's what I was afraid of. I get a kernel panic when I run either /sbin/mount -uw / or sh /etc/rc. Is there ANY other way I can get privilege to delete?
Reply
#6
Command+S = Single user mode

ls = list folder contents

rm = remove file aka. "delete"

rmdir = remove directory

su = Switch User (it defaults to root user if you don't specify a username, so most people say it means "Super User") This allows you to log in as User "A" and execute commands as User "B" with User "B"'s credentials. This remains active until you log out as User B and return to User A

sudo = execute a single command as another user, again this defaults to the root account unless you specify otherwise
eg: sudo echo "hello world"
password
hello world

chmod = change permission settings
eg: sudo chmod 777
(I could try to explain *nix permissions, but it is easier to look it up. You can do it using letters, but octal notation is quicker once you get used to it)
http://en.wikipedia.org/wiki/Unix_permission
OK, I'll try. 4=read, 2=write, 1=execute, so 4+2+1=7 (you can do whatever you want to the file)
chown = change file/folder ownership settings
eg: sudo chown user:group


the "man" files provide a good source of info too:
eg: man chmod
*****************************
OK, now that you're thoroughly confused let's get down to brass tacks.


localhost:/ root# cd /directory/that/holds_the_75GB/file
localhost:/ root# rm
localhost:/ root# ls
(notice that the 75GB file *should* be gone)
localhost:/ root# shutdown -r now

********************
**edit** I was trying to get the commands correct from memory, then realized I'd screwed up pretty badly and mixed up some Linux with the Mac OS single user mode. Sorry about that. I think that I've fixed it up now.
*********************
Reply
#7
When I type login, shouldn't the correct response be my login and password from my OSX login? The password is 20 letters/numbers though.
Reply
#8
sorry, just saw your comments about panics when you try to mount the drive. Can you boot from your backup, mount your internal drive, then delete the file? You do have a backup, right? Right?
Reply
#9
Your description of the command line in Single User Mode does not inspire confidence. Are you sure there isn't anyone else with more experience at the command line who could do this for you?

What is the path to the directory and file(s) that you want to get rid of?

What command (exactly as you'd type it) were you planning to use to delete that directory and those files?
Reply
#10
the path would be:
Macintosh HD/X DOWNLOADS/DLOADS/filename.eps

There's nothing so critical to me in that folder that deleting DLOADS or even X DOWNLOADS would bother me.

I understand the usage of "rm filename" to delete files and "rm -r directoryname" to delete directories. It's gaining the privilege to do so without mounting the drive which sends it in a kernel panic (with the oh so funny - not at all - tagline "panic: we are hanging here..."). I've been trying to figure something out for 20+ hours now - I'm fried and probably should wait until morning to try anything new. crud.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)