?invalid Command

Discussion in 'macOS' started by aflickeroflight, Jul 5, 2010.

  1. aflickeroflight macrumors newbie


    Jul 5, 2010
    I've been trying some alterations to some file tampering, and the truth is, I feel like I'm being laughed at by my own stupidity.

    Truth is, I've never used Terminal before, but with it being accessed on occasion for certain short cuts ad edits I'm finding myself having to look into it more.

    Truth is, I've been really to do this order of operation a buddy told me I needed to in order to run this program he lent me. So far, I can't even get passed the first code it is required to move further.

    sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts

    Then following this

    telnet> sudo open /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts
    ?Invalid command
    telnet> sudo nano /etc/hosts
    ?Invalid command
    telnet> open -t /etc/hosts
    -t: nodename nor servname provided, or not known
    telnet> open -a /Applications/TextEdit.app /etc/hosts
    Trying /Applications/TextEdit.app...
    /Applications/TextEdit.app: Socket operation on non-socket
    telnet> nano
    ?Invalid command

    Any idea's? I have to figure this out. I'll be online all night.
  2. Nermal Moderator


    Staff Member

    Dec 7, 2002
    New Zealand
    I have absolutely no idea how that first command dropped you into telnet. Type "q" to get out of telnet and back to the normal Terminal, then try the "sudo nano /etc/hosts" command.
  3. miles01110 macrumors Core


    Jul 24, 2006
    The Ivory Tower (I'm not coming down)
    Or if you're actually trying to do things on a remote host, use ssh instead of telnet.
  4. aflickeroflight thread starter macrumors newbie


    Jul 5, 2010
    OMG. I just.....didn't see it. It worked. Thanks guys. It's just one of those days I guess.

Share This Page