<br>Hello Erez, <br><br>I was trying to merge all branches which is mounted using unionfs , but couldn&#39;t find any standard process to achieve this.  Using unionfs we can only create unionised view but can we create merged directory (which will contain contents of all branches).  I thought i could mount two branches on /merge (See details below) and copy or archive the directory into another directory but not sure is this is correct approach.  ?<br>
<br>My only intent is to create merged directory of all branches.<br><br>Here are the steps i have tried.<br><br>[root@cogdm52_1 ~]# mkdir /d1<br>[root@cogdm52_1 ~]# mkdir /d2<br>[root@cogdm52_1 ~]# touch /d1/f1<br>[root@cogdm52_1 ~]# touch /d2/f2<br>
[root@cogdm52_1 ~]#mount -t unionfs -o dirs=/d1:/d2=ro none /merge<br>[root@cogdm52_1 ~]# ls /merge/<br>f1  f2<br><br>[root@cogdm52_1 ~]# rm /merge/f1<br>[root@cogdm52_1 ~]# touch /merge/.hide<br>[root@cogdm52_1 merge]# cd /merge<br>
[root@cogdm52_1 merge]# ls -la<br>total 8<br>drwxr-xr-x  2 root root 4096 Jul  2 06:52 .<br>drwxr-xr-x 29 root root 4096 Jul  2 06:46 ..<br>-rw-r--r--  1 root root    0 Jul  2 06:46 f2<br>-rw-r--r--  1 root root    0 Jul  2 06:52 .hide<br>
<br><br><br>When i Option 1 this command it copies hidden file as well which is right also. <br><b>Option 1<br>-------------------<br clear="all"></b>[root@cogdm52_1 ~]# find . | cpio -p /opt/test/<br><br>[root@cogdm52_1 ~]# ls -la /opt/test/<br>
drwxr-xr-x 7 root root 4096 Jul  2 07:13 .<br>drwxr-xr-x 3 root root 4096 Jul  2 07:13 ..<br>-rw-r--r--  1 root root    0 Jul  2 06:46 f2<br>-rw-r--r--  1 root root    0 Jul  2 06:52 .hide<br><br><b>Option 2<br>
-------------------</b><br>[root@cogdm52_1 merge]# cp -ax * /opt/test/<br>[root@cogdm52_1 ~]# ls -la /opt/test/<br>
drwxr-xr-x 7 root root 4096 Jul  2 07:13 .<br>
drwxr-xr-x 3 root root 4096 Jul  2 07:13 ..<br>
-rw-r--r--  1 root root    0 Jul  2 06:46 f2<br>
<br><br>Is there any better utility to merge and create one single directory of all branches ?<br><br><br><br><br>-- <br>Regards<br>Arun Sharma<br><br>