# Copy all jpgs to flash drive the easiest way

**URL:** <https://boards.straightdope.com/t/copy-all-jpgs-to-flash-drive-the-easiest-way/695272>\
**Category:** Factual Questions\
**Created:** [August 10, 2014, 11:31pm UTC](https://boards.straightdope.com/t/copy-all-jpgs-to-flash-drive-the-easiest-way/695272 "2014-08-10T23:31:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![MannyL](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@MannyL](https://boards.straightdope.com/u/MannyL)\
**Post date:** [August 10, 2014, 11:31pm UTC](https://boards.straightdope.com/t/copy-all-jpgs-to-flash-drive-the-easiest-way/695272/1 "2014-08-10T23:31:28Z")

</div>

I have a friend that has 2 hard drives in her PC. One is an old Windows XP install that was just thrown in so she could access her old pictures and documents. The other drive has Windows 8 on it but it’s failing. Right now the system is stuck in an endless loop.

What’s the easiest way to boot from a live CD and copy all .doc .jpg .gif files from both drives onto a flash drive so I can replace her HDD with a known good one and get her back up with a fresh OS install?

---

<div class="post-metadata">

**Author:** ![johnpost](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@johnpost](https://boards.straightdope.com/u/johnpost)\
**Post date:** [August 11, 2014, 12:10am UTC](https://boards.straightdope.com/t/copy-all-jpgs-to-flash-drive-the-easiest-way/695272/2 "2014-08-11T00:10:21Z")

</div>

Xubuntu 12.04 LTS will live boot and fit on a CD.

Gnome Commander is a good dual pane file manager.

---

<div class="post-metadata">

**Author:** ![MannyL](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@MannyL](https://boards.straightdope.com/u/MannyL)\
**Post date:** [August 11, 2014, 1:29am UTC](https://boards.straightdope.com/t/copy-all-jpgs-to-flash-drive-the-easiest-way/695272/3 "2014-08-11T01:29:23Z")

</div>

> [@johnpost](#):
>
> Xubuntu 12.04 LTS will live boot and fit on a CD.
> 
> Gnome Commander is a good dual pane file manager.

Ok I have Ubuntu running on a Live CD. (well Live USB) Off an 8GB Flash Drive. Can I used the unused space to save the salvaged files?

---

<div class="post-metadata">

**Author:** ![CoastalMaineiac](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@CoastalMaineiac](https://boards.straightdope.com/u/CoastalMaineiac)\
**Post date:** [August 11, 2014, 1:31am UTC](https://boards.straightdope.com/t/copy-all-jpgs-to-flash-drive-the-easiest-way/695272/4 "2014-08-11T01:31:44Z")

</div>

If you are using a Linux live CD, it sounds like you could do it with the _find_ command.

```auto

find /path/to/source/drive/ -iname "*.jpg" -o -iname ".*doc" -o - iname "*.gif" -exec cp {} /path/to/destination/drive/.

```

This seems to be the syntax you would need, although it has been a _ **long** _ time since I have had to do anything with the _find_ command.

You would need to find out where the Live CD mounted the drive you want to copy _from_ (and how to mount it, if it did not), and the same for the drive you want to copy _to_, and then enter the command at the prompt, replacing the /path/to/… with the actual paths. Usually, you can get to a command prompt by hitting Control+Alt+F1 (Any F-key numbered 1-6). Control+Alt+F7 will usually get you back to the GUI, FYI.

---

<div class="post-metadata">

**Author:** ![MannyL](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@MannyL](https://boards.straightdope.com/u/MannyL)\
**Post date:** [August 11, 2014, 1:58am UTC](https://boards.straightdope.com/t/copy-all-jpgs-to-flash-drive-the-easiest-way/695272/5 "2014-08-11T01:58:27Z")

</div>

> [@CoastalMaineiac](#):
>
> If you are using a Linux live CD, it sounds like you could do it with the _find_ command.
> 
> ```auto
> 
> find /path/to/source/drive/ -iname "*.jpg" -o -iname ".*doc" -o - iname "*.gif" -exec cp {} /path/to/destination/drive/.
> 
> ```
> 
> This seems to be the syntax you would need, although it has been a _ **long** _ time since I have had to do anything with the _find_ command.
> 
> You would need to find out where the Live CD mounted the drive you want to copy _from_ (and how to mount it, if it did not), and the same for the drive you want to copy _to_, and then enter the command at the prompt, replacing the /path/to/… with the actual paths. Usually, you can get to a command prompt by hitting Control+Alt+F1 (Any F-key numbered 1-6). Control+Alt+F7 will usually get you back to the GUI, FYI.

Thank you. My new problem is lettings Windows chkdsk run on the drive because ubuntu was “complaining” about hibernation state.

---

<div class="post-metadata">

**Author:** ![CoastalMaineiac](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@CoastalMaineiac](https://boards.straightdope.com/u/CoastalMaineiac)\
**Post date:** [August 11, 2014, 7:04am UTC](https://boards.straightdope.com/t/copy-all-jpgs-to-flash-drive-the-easiest-way/695272/6 "2014-08-11T07:04:58Z")

</div>

> [@MannyL](#):
>
> Thank you. My new problem is lettings Windows chkdsk run on the drive because ubuntu was “complaining” about hibernation state.

What’s the status of the drive if you run the following from within Ubuntu?

```auto

hdparm -I /dev/*hda*

```

Note: if the drive is a SATA drive, it is probably _sda_ instead of _hda_. Since there are two drives, it could also be _hdb_ or _sdb_.

I know I’ve had to do low-level wipes on hard drives before using the _hdparm_ command, and if the status showed “frozen,” I would have to suspend the system to RAM and wake it back up to clear the frozen state before I could do anything with the drive. Since it’s complaining about a hibernation state, perhaps it is a similar issue with, hopefully, a similar solution.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [August 11, 2014, 8:48am UTC](https://boards.straightdope.com/t/copy-all-jpgs-to-flash-drive-the-easiest-way/695272/7 "2014-08-11T08:48:50Z")

</div>

Same-named files in different folders may pose a problem. One simple workaround might be to replace _cp_ with _cp -i_ . At least this will show you the same-namings.

---

<div class="post-metadata">

**Author:** ![bump](https://avatars.discourse-cdn.com/v4/letter/b/7c8e57/32.png) [@bump](https://boards.straightdope.com/u/bump)\
**Post date:** [August 11, 2014, 6:35pm UTC](https://boards.straightdope.com/t/copy-all-jpgs-to-flash-drive-the-easiest-way/695272/8 "2014-08-11T18:35:21Z")

</div>

Why not just boot some sort of Windows XP command-line boot disk (assuming it supports usb) and then use XCOPY to grab all the jpegs to the thumb drive?

---

<div class="post-metadata">

**Author:** ![MannyL](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@MannyL](https://boards.straightdope.com/u/MannyL)\
**Post date:** [August 11, 2014, 10:13pm UTC](https://boards.straightdope.com/t/copy-all-jpgs-to-flash-drive-the-easiest-way/695272/9 "2014-08-11T22:13:10Z")

</div>

> [@bump](#):
>
> Why not just boot some sort of Windows XP command-line boot disk (assuming it supports usb) and then use XCOPY to grab all the jpegs to the thumb drive?

I feel the \*nix based file copy routines are better tasked to copy files that may have errors.
