Snippets: Difference between revisions
From fakedWiki
(Created page with "Copy certain folders from a tree with full path <pre> find htdocs/ -type d -iwholename "*→src: *" -exec mkdir -vp /srv/_tmp/{} \; find htdocs/ -type f -iwholename '*→src: *' -p…") |
No edit summary |
||
Line 1: | Line 1: | ||
Move certain folders from a tree with full path | |||
<pre> | <pre> | ||
find htdocs/ -type d -iwholename "*/*src*/*" -exec mkdir -vp /srv/_tmp/{} \; | find htdocs/ -type d -iwholename "*/*src*/*" -exec mkdir -vp /srv/_tmp/{} \; | ||
find htdocs/ -type f -iwholename '*/*src*/*' -print0 | xargs -0 -I{} | find htdocs/ -type f -iwholename '*/*src*/*' -print0 | xargs -0 -I{} mv -fv "{}" "/srv/_tmp/{}" | ||
</pre> | </pre> |
Revision as of 12:40, 12 August 2011
Move certain folders from a tree with full path
find htdocs/ -type d -iwholename "*/*src*/*" -exec mkdir -vp /srv/_tmp/{} \; find htdocs/ -type f -iwholename '*/*src*/*' -print0 | xargs -0 -I{} mv -fv "{}" "/srv/_tmp/{}"