Find the answer to your Linux question:
Results 1 to 8 of 8
Hi, Please don't flame me I've googled first - but why is this in front of my username? (and dir) I have never seen it before but am new to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2010
    Posts
    1

    Weird prefix unknown-00-11-24-22-67-14:~


    Hi, Please don't flame me I've googled first - but why is this in front of my username? (and dir) I have never seen it before but am new to terminal and want to learn.

    I am trying to rm the .Trash (some locked crap) sudo rm -rf /* isn't working and this weird 'prefix' is in front of every directory. Have I hosed it?

    Thanks
    iBook OS X.4.11/iPhone 3GS

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    I'm a tad confused. Are you referring to your prompt? Your prompt in the terminal looks like:
    Code:
    unknown-00-11-24-22-67-14:~ user$
    ?

    If so, "unknown-00-11-24-22-67-14" is most likely your hostname. You can change this to something more readable, and it's basically your computer's name on its network. The "~" refers to the current directory: "~" means "my home directory". You're on a Mac, so if you run the command:
    Code:
    cd /Volumes
    Then your prompt should change the "~" to "/Volumes". It will always show you your present directory.

    You can change the format of the prompt by setting the PS1 variable. Documentation is available at:
    How to: Change / Setup bash custom prompt (PS1)

  3. #3
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    877
    sudo rm -rf /* isn't working
    I think it would work in Linux ... bad thing, really. Most *nix systems will refuse.

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,159
    Well, "sudo rm -rf /*" if it were to be executed would nuke your entire system. Also, /.Trash is the trash can for root (system administrator). You can empty it, but DO NOT REMOVE IT! So, if you had successfully executed the command, there would have been NOTHING left on your system... I doubt that was your intention.

    Also, as Cabhan indicated, the string in the prompt in front of your user name is the system name (as far as the shell can tell) plus your location - the ':~' means "in your user home directory".
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    Ah, apparently I missed the part where you're running the command to erase your entire system.

    The command that you are trying to run will erase every file on your computer. You probably want to be running the command:
    Code:
    rm -R ~/.Trash/*
    You should basically never use sudo to rm anything, and you should probably never rm anything in the / directory.

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,159
    So Cabhan, who amongst us has NEVER done this (forgetting we are root and located at /) - rm -rf *... ? I remember a couple of those "Oh, Shiat!" moments, wondering when I last did a complete backup of the system...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    Oh yeah, I didn't mean that in a bad way. We've all had this happen many times . I had a friend once run "sudo rm -f .." instead of "sudo rm -f ." when he was in some subdirectory he had made under /usr. And I know I've erased things I shouldn't have .

    Sorry if that came across in a bad way.

  8. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,159
    Quote Originally Posted by Cabhan View Post
    Oh yeah, I didn't mean that in a bad way. We've all had this happen many times . I had a friend once run "sudo rm -f .." instead of "sudo rm -f ." when he was in some subdirectory he had made under /usr. And I know I've erased things I shouldn't have .

    Sorry if that came across in a bad way.
    It didn't. I was just commenting and didn't mean to imply you were overly "harsh" to the poster. Hence, my smiley-face.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •