xref: /titanic_51/usr/src/man/man1/dos2unix.1 (revision af8dc4373b25cce2c0bbb80f24e791f99eccbb6f)
te
Copyright (c) 2000, Sun Microsystems, Inc.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
dos2unix 1 "14 Sep 2000" "SunOS 5.11" "User Commands"
NAME
dos2unix - convert text file from DOS format to ISO format
SYNOPSIS

dos2unix [-ascii] [-iso] [-7] 
 [-437 | -850 | -860 | -863 | -865] originalfile convertedfile
DESCRIPTION

The dos2unix utility converts characters in the DOS extended character set to the corresponding ISO standard characters.

This command can be invoked from either DOS or SunOS. However, the filenames must conform to the conventions of the environment in which the command is invoked.

If the original file and the converted file are the same, dos2unix will rewrite the original file after converting it.

OPTIONS

The following options are supported:

-ascii

Removes extra carriage returns and converts end of file characters in DOS format text files to conform to SunOS requirements.

-iso

This is the default. It converts characters in the DOS extended character set to the corresponding ISO standard characters.

-7

Converts 8 bit DOS graphics characters to 7 bit space characters so that SunOS can read the file.

On non-i386 systems, dos2unix will attempt to obtain the keyboard type to determine which code page to use. Otherwise, the default is US. The user may override the code page with one of the following options:

-437

Use US code page

-850

Use multilingual code page

-860

Use Portuguese code page

-863

Use French Canadian code page

-865

Use Danish code page

OPERANDS

The following operands are required:

originalfile

The original file in DOS format that is being converted to ISO format.

convertedfile

The new file in ISO format that has been converted from the original DOS file format.

SEE ALSO

unix2dos(1), ls(1), attributes(5)

DIAGNOSTICS

File filename not found, or no read permission

The input file you specified does not exist, or you do not have read permission. Check with the SunOS command, ls -l (see ls(1)).

Bad output filename filename, or no write permission

The output file you specified is either invalid, or you do not have write permission for that file or the directory that contains it. Check also that the drive or diskette is not write-protected.

Error while writing to temporary file

An error occurred while converting your file, possibly because there is not enough space on the current drive. Check the amount of space on the current drive using the DIR command. Also be certain that the default diskette or drive is write-enabled (not write-protected). Notice that when this error occurs, the original file remains intact.

Translated temporary file name = filename.

Could not rename temporary file to filename.

The program could not perform the final step in converting your file. Your converted file is stored under the name indicated on the second line of this message.