Upon USB insert, record unique identifer sting, format drive to FAT32 and copy a file. Bash or Pytho

Posted by samsixty on Stack Overflow See other posts from Stack Overflow or by samsixty
Published on 2010-06-03T09:44:03Z Indexed on 2010/06/03 11:14 UTC
Read the original article Hit count: 146

Filed under:
|
|
|
|

Hello,

This is what I want to do,

  • insert USB flash drive.
  • mount it.
  • record uniquie identifer string to a file.
  • format the drive to FAT32.
  • copy a text file to the drive.
  • unmount it.
  • remove the drive.

30 times

The situation is this, I have bought 30 usb drives. I need to format each one to ensure they are clean, I need the unique string from each device. I need to put the same txt file on each one.

I am not great at writing scripts but can read and follow bash and python.

Any pointers would be appreciated.

© Stack Overflow or respective owner

Related posts about python

Related posts about bash