[Ilugc] copy files / directory

  • From: suresh1876@xxxxxxxxx (Suresh Kumar)
  • Date: Wed Nov 10 13:00:50 2010

On Wed, Nov 10, 2010 at 12:44 PM, Version Control Buddy
<vcbuddy@xxxxxxxxx>wrote:

 cp -pvr /var/www/vhosts/dev.site.com/httpdocs/*   /var/www/vhosts/
new.site.com/httpdocs/

but exclude the folders and subfolders in WZ directory

httpdocs/
   app/
           controllers
           config
           webroot/WZ/
           modules
           models
           templates
           views
           testfolder
           vendors
           tmp
           tests
           plugins

shopt -s extglob
cp -pvr /var/www/vhosts/dev.site.com/httpdocs/!(**/WZ)
/var/www/vhosts/new.site.com/httpdocs/

(have not tested the above, no warranty attached :) )


 ok will check it and let you know..!
 Thanks

Other related posts: