Results 1 to 10 of 10

Thread: help editing a file.

  1. #1
    Join Date
    Jan 2010
    Beans
    76

    help editing a file.

    do you need a # in front of a command when editing a file on your computer?

  2. #2
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: help editing a file.

    I don't understand what you want to do? Can you be more specific?

  3. #3
    Join Date
    Dec 2007
    Location
    In the lab
    Beans
    122

    Re: help editing a file.

    Quote Originally Posted by sincerelyydavid View Post
    do you need a # in front of a command when editing a file on your computer?
    Sorry but your question makes no sense whatsoever. I'm not sure what you mean but considering half of your question, I'll answer to the question (still not very good)

    "Do you need a # at the start of a line when editing a file on your computer?"

    Some files of your computer are configurationf iles for programs. In most cases, you can comment some lines of the file by adding the character # at the start of said line. This will make the program to ignore that line. This is useful, for example, to add an explanation what the following lines do which makes the file easier to read by the user.

  4. #4
    Join Date
    May 2009
    Beans
    71

    Re: help editing a file.

    For that matter I know that in Java and many other programming language for commenting we use slash: /
    Until you are more specific, lets keep it that way.

  5. #5
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: help editing a file.

    Quote Originally Posted by Villiam View Post
    For that matter I know that in Java and many other programming language for commenting we use slash: /
    Until you are more specific, lets keep it that way.
    You mean, double slash: // or /* */ for more than one line.

  6. #6
    Join Date
    Oct 2006
    Beans
    58,286

    Re: help editing a file.

    Quote Originally Posted by sincerelyydavid View Post
    do you need a # in front of a command when editing a file on your computer?
    You can edit any of the files in your home folder without admin privileges, to edit anything outside your home folder you would to gain need admin privileges by preceding the command with sudo or gksudo.

    As others have said, be a bit more explicit for more help.

  7. #7
    Join Date
    Dec 2007
    Location
    In the lab
    Beans
    122

    Re: help editing a file.

    Quote Originally Posted by Villiam View Post
    For that matter I know that in Java and many other programming language for commenting we use slash: /
    Until you are more specific, lets keep it that way.
    Quote Originally Posted by n0dix View Post
    You mean, double slash: // or /* */ for more than one line.
    My guess is that if he's asking about editing Java, C or any code files then he'd knew better than make this question. If he's indeed asking about commenting files, it's probably configuration files like grub (specially if you search for his other threads). It's on my previous reply the expression "in most cases" which I believe stands true for configuration files (it's also explicit on my previous answer that I'm only talking about them).
    Last edited by carandraug; March 14th, 2010 at 05:09 AM. Reason: forgot closing parethesis

  8. #8
    Join Date
    Jan 2010
    Beans
    76

    Re: help editing a file.

    alright, so i'm editing /etc/sysctl.conf and want to add the line "vm.swappiness=10" at the very end of the document. do i need to add a "#" before vm.swappiness=10.
    so
    vm.swappiness=10
    or
    #vm.swappiness=10
    Last edited by sincerelyydavid; March 14th, 2010 at 04:22 PM.

  9. #9
    Join Date
    Mar 2010
    Beans
    Hidden!

    Re: help editing a file.

    # identifies a comment - everything behind it will be ignored.

  10. #10
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: help editing a file.

    The '#' character at the start of a line means that line is ignored to the process.

Bookmarks

Posting Permissions

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