There are many ways to do this - but here is the simplest that I could figure out using rsync:
rsync -aihv --include='*/' --include='*.log*' --exclude='*' /source_folder/to/search/in/ /destination_folder/to/copy/to/
Important thing to note here is the order of include and exclude flags passed to rsync command - it is sensitive to the order in which these flags are provided.
First include flag '*/' makes rsync look into subfolders and the second flag selects all files of the format '*.log*'.
The next exclude flag excludes any file not selected as yet and then copies them over to the destination folder.
You can provide more include flags before the exclude flag to select multiple types of files as per your requirement.
6 comments:
want to have the real pleasure come to san jose escorts
I have bookmarked your site since this site contains significant data in it. I am extremely content with articles quality and introduction. You rock for keeping incredible stuff. I am a lot of appreciative for this site.360DigiTMG pmp certification in malaysia
It is the expect to give noteworthy information and best takes a shot at, including a perception of the regulatory cycle.what is hrdf
I see the best substance on your blog and I unbelievably love getting them.
360DigiTMG
Thankful to you for putting aside the push to convey this information important!
hrdf claimable training
This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck.
data science training in hyderabad
Post a Comment