This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Change Default Text File Format after installation


On Mon, 11 Apr 2005, Sebastian Schuberth wrote:

> > > > In the mount table.  See "man mount".  Google for "cygwin remount
> > > > binary" for a handy one-liner.
> > >
> > > Thanks. The default mounts seem to be encoded in the Windows
> > > registry, as there is not fstab.
> >
> > By "default mounts", do you mean the /cygdrive auto-mounts?
>
> Yes, all mounts that are there after a fresh install of Cygwin.
>
> > > It also seems I need to change the flags in a key named "cygdrive
> > > flags" if I want to change the mount mode of auto-mounted drives. Is
> > > that correct?
> >
> > No, that is *NOT* correct.  The mounts are stored in the registry *now*,
> > but they aren't guaranteed to stay in the registry in the future.  What is
> > guaranteed, however, is that the "mount" command will *always* manipulate
> > the mount table, wherever it's stored.  Cygwin's "mount" is very different
> > from the Linux "mount" -- you really should read the "mount" manpage.
>
> Well, I only need a solution for my special case *now*, so it's okay for
> me if mounts are going to be stored anywhere else in the future. My
> problem is: I've set "Default Text File Format" to "Unix" during setup.
> Now I just want to change my Cygwin installation as if I had specified
> "DOS" instead.

You can simply re-run setup in the "Keep" mode and change the filesystem
type to "DOS"...

> > The flags on the auto-mounted drives can be changed by setting them in
> > conjunction with the --change-cygdrive-prefix (-c) mount flag.  So, to
> > make them binary, just say
> >
> > mount -sbc /cygdrive
>
> Thanks. I've changed all my mounts to "textmode".

Including the cygdrive prefix?

> What I don't get: If I now create a file using VIM and look at it
> afterwards using "od -c", it still contains \n instead of \r\n line
> ends. Why is that?

Because VIm always creates files in binary mode, IIRC (perhaps because it
is linked with binmode.o, not automode.o?).  Try ":set fileformat=dos"
before saving the file.  You can also put the above command in your
~/.vimrc.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]