LinuxGuide.it > Linux Man Page: "unix2dos"

 

 
Search with Google

 

The Linux Documentation Project maintains an archive of snaphots of the (English language) core Linux manual pages that are maintained by Michael Kerrisk. Corrections and additions are welcome, but review the "Help Wanted" list, first.

Man pages belonging to programs are usually distributed together with those programs. Therefore, the core Linux man-pages mainly contains the pages for system calls and library routines, special devices, and file formats. However, it also contains documentation for a few programs, in cases where the authors or maintainers of the program do not distribute man pages themselves.

This page is part of release 3.11 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages

 

man page(1) manual page Table of Contents

Name

unix2dos - UNIX to DOS text file format converter

Synopsys

unix2dos [options] [-c convmode] [-o file ...] [-n infile outfile ...]

Options:

[-hkqV] [--help] [--keepdate] [--quiet] [--version]

Description

This manual page documents unix2dos, the program that converts text files in UNIX format to DOS format.

Options

The following options are available:

-h --help
Print online help.

-k --keepdate
Keep the date stamp of output file same as input file.

-q --quiet
Quiet mode. Suppress all warning and messages.

-V --version
Prints version information.

-c --convmode convmode
Sets conversion mode. Simulates unix2dos under SunOS.

-o --oldfile file ...
Old file mode. Convert the file and write output to it. The program default to run in this mode. Wildcard names may be used.

-n --newfile infile outfile ...
New file mode. Convert the infile and write output to outfile. File names must be given in pairs and wildcard names should NOT be used or you WILL lost your files.

Examples

Get input from stdin and write output to stdout.

unix2dos

Convert and replace a.txt. Convert and replace b.txt.

unix2dos a.txt b.txt

unix2dos -o a.txt b.txt

Convert and replace a.txt in ASCII conversion mode. Convert and replace b.txt in ISO conversion mode.

unix2dos a.txt -c iso b.txt

unix2dos -c ascii a.txt -c iso b.txt

Convert and replace a.txt while keeping original date stamp.

unix2dos -k a.txt

unix2dos -k -o a.txt

Convert a.txt and write to e.txt.

unix2dos -n a.txt e.txt

Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt.

unix2dos -k -n a.txt e.txt

Convert and replace a.txt. Convert b.txt and write to e.txt.

unix2dos a.txt -n b.txt e.txt

unix2dos -o a.txt -n b.txt e.txt

Convert c.txt and write to e.txt. Convert and replace a.txt. Convert and replace b.txt. Convert d.txt and write to f.txt.

unix2dos -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt

Diagnostics

Bugs

The program does not work properly under MSDOS in stdio processing mode. If you know why is that so, please tell me.

Author

Benjamin Lin - ( blin@socs.uts.edu.au )

Miscellany

Tested environment:

Linux 1.2.0 with GNU C 2.5.8

SunOS 4.1.3 with GNU C 2.6.3

MS-DOS 6.20 with Borland C++ 4.02

Suggestions and bug reports are welcome.

See Also

dos2unix(1)


Table of Contents

use open software!