Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I have what seemed to me as a very simple question but I couldn't find anything about it in the forums or google. I am trying to edit my ...
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    4

    Multiline entries in FSTAB

    Hi,

    I have what seemed to me as a very simple question but I couldn't find anything about it in the forums or google.

    I am trying to edit my FSTAB to include a CIFS mounted share but the entry is too long since the share name is long and I have many options so it spills to the next line and when I mount it it treats it as two different lines. Naturally, neither line on its own will mount anything.

    How do I make a multi-line entry in FSTAB?

    Thanks,

    Y. Farkash

  2. #2
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Ft. Polk, LA
    Posts
    796
    Try putting a backslash \ at the end of the first line, or maybe turn off the word wrap on your editor so it doesn't go to the next line.

  3. #3
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,114
    Try using another editor. Some, like pico and nano, will add a newline whenever
    the text wraps on the screen. There should be a command line switch
    to change this behavior though.

  4. #4
    Just Joined!
    Join Date
    Mar 2008
    Posts
    4
    Thanks!

    I do use Nano and I didn't realize the default behaviour was to add a CR at the end of the screen. the -w option overrides it.

  5. #5
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by y_farkash View Post
    Thanks!

    I do use Nano and I didn't realize the default behaviour was to add a CR at the end of the screen. the -w option overrides it.
    Yep, that's the most annoying thing about nano. I just use this on my .bashrc and .bash_profile files:

    Code:
    alias nano='nano -w'

  6. #6
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    I hate editors that do "clever" things. That's why vi is my favourite editor - it lets me do the clever things.

Posting Permissions

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