FG
💻 Software

Copying only JPG from a directory structure to another location Linux

Fresh5 days ago
Mar 15, 202623239 views
Confidence Score0%
0%

Problem

I wish to recursively go through the folders of a directory structure and copy any .jpg I find into another directory. I think I had the wrong idea with: How can I do this from the command line in Ubuntu?

Error Output

cp -R photos/*.jpg /cpjpg

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Copying only JPG from a directory structure to another location Linux

Low Risk

This will copy all files ending in .jpg or .jpeg (case insensitive as well) in the current directory and all its subdirectories to the directory /cpjpg. The directory structure is not copied.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment