[Ilugc] One Day One Command (DOS2UNIX)

Bharathi Subramanian sbharathi at MidasComm.Com
Sat Jun 18 10:27:12 IST 2005


Creative Commons is the best and cheapest way to share your art, music
or knowledge. There are around 29 internationalized versions of CC.
The time has arrived for India to have its own Creative Commons. 
URL: http://creativecommons.org/worldwide/overview 
URL: http://www.techmag.biz/?q=node/81

One Day One Command (By Vishravars Ramasubramanian)
===================================================

dos2unix -- DOS/MAC to UNIX text file format converter.

Summary:

Each OS will indicate the line end using Line Feed (LF,10) or Carriage
Return (CR,13). So when tranfering a file from DOS to Linux, you have
to convert the Line end from DOS format to Linux format.

dos2unix will convert the DOS/MAC Text file to Unix format.

Unix uses LF as line end, Windows/DOS uses CR/LF and MacOS uses CR.

Examples:

$ dos2unix dos.txt -- Convert and replace dos.txt.

$ dos2unix -n dos.txt gnu.txt -- Convert dos.txt and write into
                                 gnu.txt

$ dos2unix -k dos.txt -- Convert and replace a.txt while keeping 
                         original date stamp.

Read: man dos2unix

Bye :)
--
Bharathi S
ODOC LJ -- http://www.livejournal.com/community/ilugc/



More information about the ilugc mailing list