LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-08-2007, 06:18 PM   #1
tschima
Member
 
Registered: Apr 2006
Location: Wisconsin
Distribution: LinuxMint, knoppix, Solaris
Posts: 109

Rep: Reputation: 15
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
 
Old 07-08-2007, 06:22 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
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).
 
Old 07-09-2007, 11:02 AM   #3
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
@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.
 
Old 07-10-2007, 10:13 AM   #4
tschima
Member
 
Registered: Apr 2006
Location: Wisconsin
Distribution: LinuxMint, knoppix, Solaris
Posts: 109

Original Poster
Rep: Reputation: 15
Thanks, That's what I needed.
 
Old 07-12-2007, 03:47 AM   #5
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
You're welcome!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: identify duplicate MS Outlook .msg files? morrolan Programming 10 10-26-2006 11:46 AM
msg bash script unkn0wn Programming 6 04-28-2006 05:30 AM
Need help or suggestions on drawing a cmd-line GUI in bash. rose_bud4201 Programming 5 02-03-2006 11:35 AM
How to input several cmds to interactive apps through one shell cmd? kornerr Linux - General 4 01-01-2006 02:05 PM
Awk and Shell CMD Output xanthium Programming 16 04-24-2002 07:13 AM


All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration