Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So this is starting to bug me, but I can't find a nice tutorial on how to backup all the contents of a usb drive in Fedora. When I open up the drive, it has 1.4 GB used but only 100 Kb split between two files, which means that the rest are in the .trash folder or what not. Since I am borrowing a friends USB stick, I promised him I would back up his USB stick before I formatted it, yet I can't find a easy way to archive all the contents including backing up the trash and so forth.

I'm on Fedora 13 right now and his USB drive is often used on Arc linux (hence the .trash folder) The best idea I could think of would be just run a cp /media/MEM-EXT/ ~/temp and then archive that, but this just doesn't seem like the most optimal (or Linux-like) way to do this. Any advice?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

An easy way would probably be to tar it using the USB as the source and out it on your hard drive. Alternatively, you could use the dd utility to create a bit-for-bit clone of it. The only downside is that it would write the entire drive - including the unused portion.

share|improve this answer
    
I like this. Simple and elegant and got the job done cleanly. Thanks, would never really have thought about taring the directory, maybe I'm just tired right now :D I looked up the command online and tar -zcvf archive-name.tar.gz /media/MEM-EXT/ worked perfectly –  Bob Jan 27 '12 at 5:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.