Find the answer to your Linux question:
Results 1 to 3 of 3
Hey people how's it goin? I'm running SuSe development 10, although my question is so simple I don't think that it matters. I've mostly been brought up on windows, so ...
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    2

    How to edit a file from a command line

    Hey people how's it goin?

    I'm running SuSe development 10, although my question is so simple I don't think that it matters.
    I've mostly been brought up on windows, so I don't have that much experience with command line arguments.

    As such, how do you edit a file from the command line?

    let's say for instance that your files name is index.html

    --
    I tried to do
    edit index.html

    which gave me this result:

    "index.html" [Incomplete last line] 88 lines, 4209 characters
    :

    then
    vi

    which opened index.html in the command prompt....can I edit the program/save the program there? How do I make changes? Where can I learn the language?

  2. #2
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,298
    The Vim commands cheat sheet

    should help you get started with vi / vim, another alternative is to try the editor nano

    nano index.html
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

  3. #3
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,095
    If you happen to have vim on your machine, you can run vimtutor from the command line for a quick tutorial that's easy to understand.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

Posting Permissions

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