txt files in windows won't work in linux

James Drabb JDrabb at tampabay.rr.com
Sat Nov 30 06:58:21 PST 2002

On Sat, 30 Nov 2002 17:28:17 +1100
"john smith" <no at thanks.com> wrote:

> hello.
> I'm using my windows computer to browse the blfs book and download
> packages. I then use samba on the lfs system to transfer what I need.
> My vi skills are pretty poor and  rather than type all my init scripts
> out I would like to copy and paste to a text file while in windows and
> then copy this over to the lfs system.

You can copy and past under Linux using many methods.  From X you can
select text and then press the middle button to paste.  If you have a
wheel, just press the wheel.  If you only have two button with no wheel,
press both buttons at the same time.

> I have tried this and although the script files look normal from cat
> they never work complaining about "command not found" and other errors
> like that.

This is because they are in windows cr/lf format.  You can either use a
good windows editor like textpad and save in unix format or you need to
convert them on Linux.  To convert them you can use vim like so:

1.  Open the file in vim
2.  Press :
3.  Type set ff=unix <enter>
4.  Press :
5.  Type wq <enter>
6.  Repeat as needed.

Or Get dos2unix (search freshmeat.net) and just do a dos2unix -u * to
convert all file in a directory.

Jim Drabb
Those who would sacrifice freedom for security will get neither
James Drabb JR
Programmer Analyst
Davenport, FL
JDrabb at tampabay.rr.com
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message

More information about the blfs-support mailing list