LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Formatting a USB memory stick (https://www.linuxquestions.org/questions/linux-newbie-8/formatting-a-usb-memory-stick-805216/)

Chriscrof 04-30-2010 02:39 PM

Formatting a USB memory stick
 
I have a 4 Gb memory stick which used to have OpenSuse on it but I don't use OpenSuse and wanted to use the stick for something else - for backing up my Mozilla Thunderbird installation.

I thought that by re-formatting the stick, using a file obtainable from the HP web site, suggested in connection with installing Linux on a memory stick, that it would leave me with an empty one but it hasn't; there is still a lot of OpenSuse stuff on it.

How can I "empty" it so that I can use it to transfer my Ubuntu Thunderbird to another computer which is also running Ubuntu.

I was going to open a terminal and type:

sudo cp -avr /home/chris/.thunderbird/ /media/disk

I have already tried this but it didn't appear to work, so is this not the right way to go about it?

rweaver 04-30-2010 03:55 PM

Well lets take a look at what you actaully did there--

Code:

sudo cp -avr /home/chris/.thunderbird/ /media/disk
SUPER-USER-DO COPY --archive --verbose --recursive FROM /home/chris/.thunderbird/ TO /media/disk

So basically you added files to the key but you didn't remove anything or format in any way shape or form.

If you wish to DELETE the contents on the key use REMOVE
Code:

sudo rm -rf /media/disk/*
As with anything related to deletion or removal of files I suggest you have a tested good backup on hand... etc.

Generally you're not going to format something unless you need to change the file system that resides on it.

bjrn64 04-30-2010 05:34 PM

hi
ive formatted a few sd cards and usb sticks and have found that the easy method is when you plug in your stick an icon will appear on your desktop if not you will find it in places or computer but with the icon on the desktop right click and on the menu you will see format click and your there you have about 4 options to format to ie fat for linux/windows compatible or ext2 ext4 or encrypted also from the same dialogue box you can jump to disk utility where you have exta options ie partions
the other way to get to disk utility is /system/admin/disk utility
ive never had any problems using these methods

evo2 04-30-2010 11:29 PM

fdisk and mkdosfs are probably the commands you are looking for.

Cheers,

Evo2.

Chriscrof 05-01-2010 03:31 AM

Thanks, rweaver, for explaining what the command actually does. I am wondering if the destination is correct because when I did that command again there was a lot of activity but the LTD on the memory stick did not flash like it usually does when something is being written to it. Perhaps it should be /dev/sdd ? At the end of the process it said that it was written to /media/disk/ but the memory stick is empty.

Thanks too,bjrn64 and evo2, I have now formatted the memory stick


All times are GMT -5. The time now is 04:44 AM.