Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] CP a file set



JC Helary wrote:
> I have a folder hierarchy that contains a variety of file formats and  
> I want to reproduce the same hierarchy with the folders that contain  
> files of a specified extension and those files.
>   

I don't use OSX but if it has rsync.  The following should copy all
files with extension .jpg or .jpeg from a hierarchy under from-folder/
to a new hierarchy under to-folder/

# rsync -aWmrv --include="**/" --include='*.jpg' --include='*.jpeg'
--exclude='**'  from-folder/  to-folder/

-m should prune empty directories so if that wasn't what you intended
remove it.

Edward


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links