floppy mount....AIX/Windows

floppy mount....AIX/Windows

Post by Kumar Sundara » Sat, 02 Jun 2001 04:24:45



Can someone give a step by step procedure to access a floppy disk and copy files back and forth from
a Unxi System. I use AIX /Win 98.

Thanks,
KS

 
 
 

floppy mount....AIX/Windows

Post by pe.. » Sat, 02 Jun 2001 07:36:47



> Can someone give a step by step procedure to access a floppy disk and copy files back and forth from
> a Unxi System. I use AIX /Win 98.

Can't say much about aix but on *BSD i can copy to/from a diskette with the
command mcopy :

$ mcopy very-nice.file a:

will copy the file ( munging the name to gate-ish )

$ mdir a:
will show the contents of the diskette

Those commands ( and more ) is avaliable in "mtools" package, found on
most well-assorted file archives.

( in addition most un*x may actually mount a ms-dos formatted floppy as
a "filesystem". This will make multiple simultaneous accesses possible, but
this is seldom needed)

Quote:> Thanks,
> KS

--
Peter H?kanson        
        IPSec  Sverige      (At the Riverside of Gothenburg, home of Volvo)
           Sorry about my e-mail address, but i'm trying to keep spam out.
           Remove "icke-reklam"and "invalid"  and it works.

 
 
 

floppy mount....AIX/Windows

Post by Ben Kame » Tue, 26 Jun 2001 05:15:04


Kumar Sundaram wrote:

> Can someone give a step by step procedure to access a floppy disk and copy files back and forth from
> a Unxi System. I use AIX /Win 98.

> Thanks,
> KS

AIX has some dos compatibility commands...

dosdir
dosread
doswrite

Those should do it for you.

Here's the MAN pages. Enjoy.

 -Ben

--
Ben Kamen - Fixer of Broken Things
======================================================================
Email: bka...@benjammin.net              Web: http://www.benjammin.net

A gleekzorp without a tornpee is like a quop without a fertsneet (sort
of).

[ aix-dos-commands.txt 10K ]

--------------------------------------------------------------------------------
                 AIX Version 4.3 Commands Reference, Volume 2
--------------------------------------------------------------------------------

dosdir Command

Purpose

Lists the directory for DOS files.

Syntax

dosdir [ -l [ -e ] ] [ -a ] [ -d ] [ -t ] [ -v ] [ -D Device ] [ File ... |
Directory ... ]

Description

The dosdir command displays information about the specified DOS files or
directories. If you specify a directory without also specifying the -d flag, the
dosdir command displays information about the files in that directory.

DOS file-naming conventions are used with one exception. Since the \ (backslash)
character can have special meaning to the operating system, use a / (slash)
character as the delimiter to specify subdirectory names in a DOS path name. The
dosdir command converts lowercase characters in the file or directory name to
uppercase before it checks the disk. Because all file names are assumed to be
full (not relative) path names, you need not add the initial / (slash).

Flags

-a Writes information about all files. This includes hidden and system files as
well as the . (dot) and .. (dot-dot) files.

-d Treats the File value as a file, even if a directory is specified. When a
directory is specified with the Directory parameter, information about the
directory itself is listed instead of information about the files it contains.

-DDevice Specifies the name of the DOS device as /dev/fd0 or /dev/fd1. The
default device is /dev/fd0.

-e Uses the -l flag to write the list of clusters allocated to the file.

-l Produces a list of clusters that includes the creation date, size in bytes,
and attributes of the file. The size of a subdirectory is specified as 0 bytes.
The attributes have the following meanings:

A (Archive) The file has not been backed up since it was last modified.

D (Directory) The file is a subdirectory and not included in the normal DOS
directory search.

H (Hidden) The file is not included in the normal DOS directory search.

R (Read-only) The file cannot be modified.

S (System) The file is a system file and not included in the normal DOS directory
search.

-t Lists the entire directory tree starting at the named directory.

-v Writes information to standard output about the format of the disk. Use this
flag to verify that a device is a DOS disk.

Examples

To read a directory of the DOS files on /dev/fd0, enter:
dosdir

The command returns the names of the files and disk-space information.
PG3-25.TXT

PG4-25.TXT

PG5-25.TXT

PG6-25.TXT

Free space: 312320 bytes

To read a directory of the DOS files on /dev/fd1, enter:
dosdir -D/dev/fd1

The command returns the names of the files and disk-space information.
PG7-25.TXT

PG8-25.TXT

PG9-25.TXT

PG10-25.TXT

Free space: 312320 bytes

Files

/usr/bin/dosdir Contains the dosdir command.

Related Information

The dosdel command, dosformat command, dosread command, doswrite command.

Files Overview in AIX Version 4.3 System User's Guide: Operating System and
Devices describes files, file types, and how to name files.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
                 AIX Version 4.3 Commands Reference, Volume 2
--------------------------------------------------------------------------------

dosread Command

Purpose

Copies DOS files to AIX files.

Syntax

dosread [ -a ] [ -v ] [ -D Device ] File1 [ File2 ]

Description

The dosread command copies the DOS file specified by the File1 variable to
standard output or to the AIX file specified by the File2 variable. If no
pathname is specified for the File2 variable, the DOS file is copied to the root
directory.

Unless otherwise specified, the dosread command copies the number of bytes
specified in the directory entry for the file specified by the File1 variable.
This means, in particular, that you cannot copy directories because, by
convention, directories have a record size of 0.

You can use DOS file-naming conventions with one exception: the \ (backslash).
Because the \ character can have special meaning in DOS, use a / (slash)
character as the delimiter to specify subdirectory names in a DOS path name. The
dosdir command converts lowercase characters in the file or directory name to
uppercase before it checks the disk. Because all file names are assumed to be
full (not relative) path names, you need not add the initial / (slash).

    Notes:

      1. The dosread command does not interpret the * and ? (asterisk and
         question mark) wildcard characters as having special meaning. If you do
         not specify a file-name extension, the file name is matched as if you
         had specified a blank extension.
      2. You cannot customize the name of this command. The command must be named
         dosread.
      3. The dosread command reads files from the default drive containing the
         DOS diskette. The dosread command then copies the files to the current
         AIX directory as AIX files. If the DOS diskette contains subdirectories,
         the dosread command does not create corresponding new subdirectories in
         AIX. You must create the subdirectory for AIX and specify each DOS file
         you want to copy into the new AIX subdirectory.

Flags

-a Replaces each CR-LF (carriage return, line-feed) key sequence with a new-line
character and interprets a Ctrl-Z (ASCII SUB) key sequence as the end-of-line
character.

-DDevice Specifies the name of the DOS device as /dev/fd0 or /dev/fd1. The
default value of the Device variable is /dev/fd0. This device must have the DOS
disk format.

-v Writes file information to standard output about the format of the disk. Use
this flag to verify that a device is a DOS disk.

Examples

  1. To copy a text file from a DOS diskette to the AIX file system, enter:
     dosread -a chap1.doc chap1

     This command sequence copies the DOS text file \CHAP1.DOC on default device
     /dev/fd0 to the AIX file chap1 in the current directory.
  2. To copy a binary file from a DOS diskette to the AIX file system, enter:
     dosread -D/dev/fd1 /survey/test.dta /home/fran/testdata

     This command sequence copies the DOS data file \SURVEY\TEST.DTA on /dev/fd1
     to the AIX file /home/fran/testdata.
  3. To copy every DOS file on a diskette to the AIX file system, enter:
     dosdir | awk '!/There are/ {print $1}'|xargs -t -i dosread {} {}

     This command sequence takes files from the default drive containing the DOS
     disk and copies them to the current directory as AIX files.

Files

/usr/bin/dosread Contains the dosread command.

/dev/fd0 Contains the device name for a diskette drive.

Related Information

The awk command, dosdel command, dosdir command, dosformat command, doswrite
command, xargs command.

File Systems and Directories Overview in AIX Version 4.3 System User's Guide:
Operating System and Devices.

Files Overview in AIX Version 4.3 System User's Guide: Operating System and
Devices describes files, file types, and how to name files.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
                 AIX Version 4.3 Commands Reference, Volume 2
--------------------------------------------------------------------------------

doswrite Command

Purpose

Copies AIX files to DOS files.

Syntax

doswrite [ -a ] [ -v ] [ -DDevice ] File1 File2

Description

The doswrite command copies the AIX file specified by the File1 parameter to the
DOS file specified by the File2 parameter. The doswrite command copies files to a
single DOS diskette. The doswrite command cannot copy files across multiple DOS
diskettes.

The doswrite command writes the file specified by the File2 parameter to the DOS
device using standard DOS naming conventions. Because the DOS \ (backslash)
character can have a special meaning for the DOS operating system, do not use a \
(backslash) when specifying subdirectory names in the File2 parameter. Use the
AIX / (slash) character instead.

The doswrite command converts lowercase characters specified in the File1
parameter to uppercase before it checks the DOS device. Because all file names
are assumed to be full (not relative) path names, you do not need to add the
initial / (slash).

If the file specified in the File2 parameter contains a / (slash), each
intervening component must exist as a directory and the last component (the named
file) must not exist. Any existing file with the same name is overwritten.

    Notes:

      1. The wildcard characters * and ? (asterisk and question mark) are not
         treated in a special way by this command (although they are by the
         shell). If you do not specify a file-name extension, the file name is
         matched as if you had specified a blank extension.
      2. This command must be named doswrite.
      3. A DOS directory holds up to 244 files.

Flags

-a Replaces NL (new-line) characters with the CR-LF (carriage return, line-feed)
sequence. Ctrl-Z is added to the output at the end of file.

-D Device Specifies the name of the DOS device as /dev/fd0 or /dev/fd1. The
default device is /dev/fd0. This device must have the DOS disk format.

-v Writes information to standard output about the format of the disk. Use this
flag to verify that a device is a DOS disk.

Examples

  1. To copy a text file from the AIX file system to a DOS diskette, enter:
     doswrite -a chap1 chap1.doc

     This copies the AIX file chap1 in the current directory to the DOS text file
     \CHAP1.DOC on default device /dev/fd0.
  2. To copy a binary file from the AIX file system to a DOS diskette, enter:
     doswrite -D/dev/fd1 /home/fran/testdata /survey/test.dta

     This copies the AIX data
...

read more »