UNIX command to format or delete all content on Flash Drive

Need a unix command that will allow me to quickly remove all contents or format a flash drive.
Computers will be OS X based and I would have to batch process them.
I'm just looking for the command itself, then my other guys can automate them
Thanks

Hi Mihalis,
   The second of your commands has a risk of failure because some of the directories may not be empty when the attempt is made to delete them. The problem isn't that the command won't try to delete all directories. The problem is that it tries to delete higher level directories before the directories they contain. A depth-first search will remedy that problem. Thus, I recommend the following form of the command:
find -d /Volumes/Flash -type d -exec rmdir {} \;
or
find -d /Volumes/Flash -type d -delete
Gary
~~~~
   A straw vote only shows which way the hot air blows.
         -- O'Henry

Similar Messages

  • I bought this apple ipad from pawn shop and have receipt. its locked by previous owner and pawn shop had no info on previous owner to contact. how can I delete all content and start fresh so my grandson can use for college?

    i bought this apple ipad from pawn shop and have receipt. its locked by previous owner and pawn shop had no info on previous owner to contact. how can I delete all content and start fresh so my grandson can use for college?

    If it's activation locked, you can't; go back to the shop and ask for a refund.
    (120778)

  • HT1386 I am re-building my iTunes library, but still have all the content on my iPod Classic.  I have just downloaded some songs from the store and want to add them to the iPod, BUT when i attempt this the message asks if I want to delete all content on t

    I am rebuilding my iTunes library, but still have all the old content on my iPod Classic.  I have just download some songs from the iStore and want to add them to the iPod, BUT when I try to sync it asks if I want to delete all content from the iPod and add only the material that I have just downloaded from the Store.  I do not want to lose my old content, because it is very extensive.

    You are trying to sync to other than the one iTunes library you can sync to. You can copy music from multiple library/computer if you use the manual method of syncing. That method is described here
    iTunes: Syncing media content to iOS devices and iPod
    If you want to make this computer/iTunes library your syncing computer/library you have to restore the iPod on this computer/library. Restoring erases the iPod.
    You can redownload most iTunes purchases by:
    iTunes: Syncing media content to iOS devices and iPod
    To copy other music to the computer see:
    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities
    BTW this is the iPod touch forum

  • I am trying to upgrade my iPhone 4 to the latest iOS via iTunes, but I keep getting a message saying that an error [-5000] occurred and continuing will delete all content on my iPhone. What's the solution?

    I am trying to upgrade my iPhone 4 to the latest iOS via iTunes, but I keep getting a message saying that an error [-5000] occurred and continuing will delete all content on my iPhone. What's the solution?

    okay I've done everything regarding the transfer process (via file>transfer purchases) and syncing, so everything on my iPhone device seems to have been transferred to my iMac... however, I still get that message ("There are purchased items on the iPhone..."), trying to upgrade the iOS Have tried several times the same process of hitting transfer purchases via file, but nothing seems to make that message go away! Would have been nice to know which files I actually do need to transfer, which I don't get any info on of course...
    Starting to get really annoying this thing.. Any smart suggestions what's going on?

  • HT201274 hi, I want to sell my iphone, how can I delete all contents? many thanks

    hi, I want to sell my iphone, how can I delete all contents? many thanks

    Settings > Messages > iMessage > Off
    Settings > FaceTime > Off
    Settings > iCloud > Delete Account
    Settings > General > Reset > Erase All Content and Settings

  • My iPad shows using 4.1GB of storage for mail, even though I have delete all content in the folders. How do I get this storage back?

    My iPad shows using 4.1GB of storage for mail, even though I have deleted all content in the folders. How do I get this storage back?

    My iPad shows using 4.1GB of storage for mail, even though I have deleted all content in the folders. How do I get this storage back?

  • My ipad is not responding, i accdentaily touch delete all contents and setting

    my ipad is not responding , i accdentaily touch delete all contents and setting ,and now it shows a blanck sreen, with the itune icone and uv cord

    Assuming that you installed iTunes on your computer, you have to connect your iPad to your computer with the cable - plug the pin connector end into the iPad and the USB connector to a USB port on your computer. iTunes should start up on its own. If it doesn't start up, launch it yourself.
    Then follow the directions in this support article.
    http://support.apple.com/kb/ht1414

  • I can update my phone but then it says that it will delete all content on my phone

    please help me

    iphone0000000 wrote:
    i can update my phone but then it says that it will delete all content on my phone
    This means that you are using a different computer to update it from the one you usually sync to. Alternatively, it may mean that you never sync to a computer.

  • How to delete all content on a time capsule created by Time Machine, and begin again creating a new savings bundle

    How to delete all content on a time capsule created by Time Machine, and begin again creating a new savings bundle ?

    You make a sparse bundle.. but don't ask me how that is different to a bundle of savings. Sparsebundle is what the special TM backup is called. It is a kind of disk image I think.. what makes it sparse is unclear as well.
    Anyway.. you are on Lion I guess.. download 5.6 utility for Lion. http://support.apple.com/kb/DL1482
    So you can get a utility that does utilities.. and not pretty faces.
    And go to the disk page and erase the drive.. a quick erase is plenty and is pretty fast.

  • I am getting alert -5000 when updating to iOS5 and it says it will delete all contents on my phone if I continue.  What to do?

    I am getting alert error message -5000 when trying to update to iOS5 and it says it will delete all content on my phone if I continue.  Anyone know what to do?

    See Here for one way
    iTunes: How to move your music to a new computer
    Or...
    From your Old Computer... Copy your ENTIRE iTunes FOLDER to an External Drive... and then from the External Drive to your New Computer..
    An Added Bonus is that you will then have a Backup of iTunes...
    Backup iTunes to an External Drive
    http://support.apple.com/kb/HT1751
    Also there is this
    By Turingtest2  See this User Tip.

  • If i delete all content and settings will i need to call my carrier and reactivate my phone

    If i delete all content and settings will i need to call my carrier and reactivate my phone ... help?! please

    No.

  • Force deleting all content in UCM

    Hi
    I have a UCM that is n a bad state, its database has records of content that it does not have on disk. So if I try and delete all content via the archiver, it fails with a message saying (there are too many errors).
    How can I force delete all content? Empty some specific database tables and delete some directory on disk, or?
    Thank you
    Søren

    Hi Jonathan, Srinath
    Download the example that are in http://jonathanhult.com/blog/2013/07/delete-content-ridc/ and run this successfull, the out is:
    13:14:28.266 [main] DEBUG c.j.w.c.d.DeleteContentRIDCUtils - Service binder before executing:
    13:14:28.268 [main] DEBUG c.j.w.c.d.DeleteContentRIDCUtils - {dataSource=RevisionIDs, IdcService=GET_DATARESULTSET, UserTimeZone=UTC, UserDateFormat=iso8601, resultName=RevisionIDs}
    13:14:28.480 [main] DEBUG c.j.w.c.d.DeleteContentRIDCUtils - Successfully called service
    13:14:28.480 [main] DEBUG c.j.w.c.d.DeleteContentRIDCUtils - Service binder after executing:
    13:14:28.481 [main] DEBUG c.j.w.c.d.DeleteContentRIDCUtils - {dataSource=RevisionIDs, UserDateFormat=iso8601, UserTimeZone=UTC, ClientEncoding=UTF-8, IdcService=GET_DATARESULTSET, addAlert=1, nextRow=0, dUser=sysadmin, refreshSubjects=, blDateFormat=yyyy-MM-dd HH:mm:ssZ!tUTC!mAM,PM, refreshMonikers=, changedSubjects=, refreshSubMonikers=, copyAborted=0, blFieldTypes=xWebsiteObjectType, ..., xIdcProfile text,xComments memo, NoHttpHeaders=0, changedMonikers=, resultName=RevisionIDs, idcToken=, hasUserAccessChanged=1, IsJava=1, localizedForResponse=1}
    13:14:28.484 [main] INFO  c.j.w.c.d.DeleteContentRIDCUtils - Total number of content items found using query: 0
    probably was because he had previously removed content directly in the database.
    I deleted all folders that are in UCM_HOME/cs/archives via archiver, but i still see part of the structure of the content in /UCM_HOME/cs/weblayout/websites, /UCM_HOME/cs/weblayout/fragments/, and so on,  they are in shared filesystem for my cluster UCM. I can start a new migration content?
    What happens to the information found in the tables of the database?
    DELETEDROWS   
    FOLDERHISTORY 
    INDEXERSTATE
    REVCLASSES
    Is correct that persist the information in theyy tabless?
    Thanks.
    Regards.

  • Delete all contents on macbook

    how do i clear or delete all contents ready to resell laptop

    Hello spiritosa_3,
    The process to perform what is referred to as an 'Erase and Install' (erasing the contents of the computer and installing only the operating system) differs slightly depending on the version of the Mac OS you're running. The steps are the same for Lion and Mountain Lion, however.
    Mac OS X v10.6 Snow Leopard: How to Erase and Install
    http://support.apple.com/kb/HT3910
    Use these steps to restore to the factory settings and the software that originally came with your computer by using the installation DVDs that shipped with it.
    OS X Mountain Lion: Erase and reinstall OS X
    http://support.apple.com/kb/PH11273
    You can erase your Mac and then reinstall OS X using the built-in recovery disk. Before you erase and reinstall, back up your essential files.
    Cheers,
    Allen

  • All content in Flash Player is tiny.

    All content in Flash Player is tiny. It wasn't like this when originally installed. I have even disabled it, tried px thing, and uninstalled couple of time and even scanned for leftovers. The problem is in Firefox latest version. Can someone please help?

    Sorry for the late reply, the notification of you replying was mixed up with other emails and I didn't notice.

  • How do I delete files on my flash drive? I get an error message that I do not have permission.

    How do I delete files on my flash drive? When I try to, I get an error message that says I do not have permission to do so.

    There are two user IDs and 2 passwords required on most email accounts (except iCloud and MS Exchange). You need to enter id and password for incoming email, and again under the Outgoing (SMTP) server settings for sending. You either have no id and password or a wrong id or password for the outgoing server.

Maybe you are looking for

  • How to use JavaSript library stored in mime type repository???

    Hi Experts I currently have the situation that I would like to deploy several JavaScript functions in a multitude of templates. I need my own JavaScript functions as the provided functionality is not sufficient. I have figured that I can add my funct

  • Kde4, xorg or nvidia?

    Hi guys and girls, I recently did a new install and went for kde4 (not impressed). Now I'm having a problem with the windows. When I open a menu (kmenu for example) or a new window comes up (settings) it's not rendered completely, but after a second

  • ABAP short dump after BI upgrade

    hi all, While executing any program  in SE38, it is giving Short dump while same program executing in SA38, it is executing . Firstly, we got short dump in TCode - RSRT, while executing report. Regards, Prasad Edited by: Prasad Mahindrakar on Apr 14,

  • How to add new alert sounds to Sound Effects in Sys. Prefs

    I'd like to add a sound (it's in MP3) to the Sound Effects in System Preferences. How do I do this?

  • Transferring ipod photos from ipod back to computer

    Had to get new hard drive. Back ups were copromised. All 1100 photos from years are on ipod. Support says they cannot be transferred back to computer even thought music and videos transferred. Any ideas how i can save years worth of photos back to co