[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to verify files copied to /dev/fd0?

Posted on 1998-09-20
7
Medium Priority
?
257 Views
Last Modified: 2013-11-13
I have used Midnight File Manager to copy files to a floppy. The floppy was formatted from Linux with fdformat /dev/fd0H1440. before I formatted the floppy, there was a boot floppy in the drive, which I removed before working with this new floppy. I then copied several files to the /mnt/floppy, but something told me when I exceeded what could possibly fit onto the floppy, that I may not be writing to the floppy. Now, I can go to the floppy and see the files, yet they are not on the actual floppy disk.  I wantto transport these files to my other Linux box. How can I be sure I am writing to the floppy?  These are RedHAt rpm's which I downloaded from RedHats ftp site. Also, what command can I use to compress the files right to the floppy, and possibly span seveeral floppy disks with big files?
0
Comment
Question by:joe_massimino
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1638097
verify:   sum
compress: gzip
span several floppyes:  split

0
 
LVL 6

Author Comment

by:joe_massimino
ID: 1638098
This is not a complete answer, please go into more details. Maybe you can tell me what is happening so I can understand it, and give the commands in detailed examples with comment.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1638099
How about using  man  to get docs ;-))

sum      - compute checksum and count the blocks in a file

   sum file
   cp  file /fd_mountpoint
   sum /fd_mountpoint/file

Both sum commands should report the same result.
You may also use wc instead for a more simple check.


gzip      - compress or expand a file

   gzip file      # to compress a file, produces file.gz
   gunzip file.gz # uncompress file.gz, produces file

Don't know what needs to be explained here.


split      - split a file into pieces

   split -b 1400k file

splits your file in pieces of max 1400kbytes size.

0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 2

Accepted Solution

by:
JYoungman earned 140 total points
ID: 1638100
You forgot to mount the floppy drive with "mount /mnt/floppy".
Then you can copy files with the regular "cp" command.  If you try to read the data back you'll get the cached version, so unmount /mnt/floppy (which you have to do anyway), then pop the disk out and in again.  Remount the floppy and compare the files (with diff).  Errors are very rare in my experience, so I presonally don't often do this.  If the file is really vital, put a couple of copies on.

RPM files are already compressed, you won't gain anything by compressing them again.

To split files over several floppies, the easiest method is to write a tar qrchive directly to the floppy.  Unmount the floppy and use "tar" to write a multivolume archive:-

tar cfM /dev/fd0 the-list-of-files-to-save

You will be prompted to change disk as appropriate.  Extract these onto another machine with

taf xfM /dev/fd0
0
 

Expert Comment

by:tunct
ID: 1638101
try using msdos-formatted floppies and mtools (mcopy, mformat, mdel, etc.)... you are probably copying to a non-mounted directory (ls -l /mnt/floppy). check whether the floppy led flashes while copying in any case. do the permissions of /dev/fd0xxx  allow writing?

as for multiple floppy archives, make a zipped tar file (tar zcvf blah.tar <files>), then split it into 1440k blocks (split -b 1440k blah.tar blah_tar.). this produces files of size 1440k and having names such as blah_tar.aa. the last argument of split is the prefix used for naming the individual 1440k-files (in the example "blah.tar."). on the target machine, concatenate files using (cat blah_tar.?? >> blah.tar).
0
 
LVL 2

Expert Comment

by:JYoungman
ID: 1638102
Achim, your "sum" command will always succeed, because of the buffering.  You have to provoke a disk-change in order to make that really check the data on the floppy.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1638103
disk-change, umount&mount, know this trap.
Thanks anyway, I always forget to think about it 'cause I seldom use ext2 on floppys.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month14 days, 16 hours left to enroll

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question