LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash shell cmd msg w/dd (https://www.linuxquestions.org/questions/linux-newbie-8/bash-shell-cmd-msg-w-dd-567665/)

tschima 07-08-2007 05:18 PM

bash shell cmd msg w/dd
 
Two Questions actually

Background: I'm storing my floppies on hdd for burning to disc later. Using Suse 10.1 w/latest patches on an AMD K6III.
bash is 3.00.16

1. When I issue this double command at the prompt,

clear & dd if=/dev/fd0 of=foofile

sometimes after the clear I get some numbers in the upper left screen like: [1] 12423

I haven't looked carefully, but I think the second number changes. No error is returned after dd finishes. I'm changing diskettes as fast as I can (but unmounting & mounting). Do I need to give the system more time after mounting? The diskette drive light doesn't come on when mounting & unmounting.

2. Is there a way to check the integrity of DOS diskettes and the dd images I am creating of them? fsck is only for hdds, right?

Terry

macemoneta 07-08-2007 05:22 PM

I think you want to either:

clear ; dd if=/dev/fd0 of=foofile

or

clear && dd if=/dev/fd0 of=foofile

The command you are issuing doesn't do what you think it does (it runs clear as a background process).

timmeke 07-09-2007 10:02 AM

@macemoneta: exactly!

The fact that clear is started in the background, is reflected by the output:
Quote:

[1] 12423
The number between [] is the shell's job number for the background process (run the "jobs" command to find any running jobs). The number at the end is the process ID. So yes, the second number (and sometimes the first one too) will definitely change.

You should give the system sufficient time to (un)mount the disks when you swap them. And the light should go on when you issue the dd command.

I found some tools related to working with DOS disks: see "man mtools" for details. Not sure if any of them actually checks DOS disks. Then again, "fsck -t msdos /etc/fd0" (or "fsck -t vfat /etc/fc0) might work too.
Normally, though, fsck will check the filesystem type automatically if it's set to "auto" in /etc/fstab.

tschima 07-10-2007 09:13 AM

Thanks, That's what I needed.

timmeke 07-12-2007 02:47 AM

You're welcome!


All times are GMT -5. The time now is 05:46 PM.