[[email protected] 20141011ntlib]# ls -al
total 16
drwxr-xr-x. 4 root root 4096 Oct 11 11:41 .
drwxrwxr-x. 22 bluesun bluesun 4096 Oct 11 11:41 ..
-rw-r--r--. 1 root root 0 Oct 11 11:41 1
drwxr-xr-x. 4 root root 4096 Oct 11 11:00 jsp
drwxr-xr-x. 3 root root 4096 Oct 11 11:00 WEB-INF
[[email protected] 20141011ntlib]# pwd
/root/20141011ntlib
test是空文件夹
[email protected] test]# pwd
/root/test
cp -r 20141011ntlib/ test/
[[email protected] test]# ls -al
total 12
drwxr-xr-x. 3 root root 4096 Oct 11 11:45 .
drwxrwxr-x. 22 bluesun bluesun 4096 Oct 11 11:41 ..
drwxr-xr-x. 4 root root 4096 Oct 11 11:45 20141011ntlib
[[email protected] ~]# cp -r 20141011ntlib/. test
[[email protected] ~]# cd test
[[email protected] test]# ls -al
total 16
drwxr-xr-x. 4 root root 4096 Oct 11 11:54 .
drwxrwxr-x. 22 bluesun bluesun 4096 Oct 11 11:41 ..
-rw-r--r--. 1 root root 0 Oct 11 11:54 1
drwxr-xr-x. 4 root root 4096 Oct 11 11:54 jsp
drwxr-xr-x. 3 root root 4096 Oct 11 11:54 WEB-INF
文件变动后,需要覆盖至test目录
[[email protected] 20141011ntlib]# ls -lR
.:
total 4
-rw-r--r--. 1 root root 0 Oct 11 11:58 2
-rw-r--r--. 1 root root 0 Oct 11 11:58 3
drwxr-xr-x. 2 root root 4096 Oct 11 11:59 jsp
./jsp:
total 0
-rw-r--r--. 1 root root 0 Oct 11 11:59 abcdef.jsp
[[email protected] ~]# cp -R 20141011ntlib/. test
[[email protected] ~]# ls -lR test
test:
total 8
-rw-r--r--. 1 root root 0 Oct 11 12:02 1
-rw-r--r--. 1 root root 0 Oct 11 12:03 2
-rw-r--r--. 1 root root 0 Oct 11 12:03 3
drwxr-xr-x. 4 root root 4096 Oct 11 12:03 jsp
drwxr-xr-x. 3 root root 4096 Oct 11 12:02 WEB-INF
test/jsp:
total 16
-rw-r--r--. 1 root root 0 Oct 11 12:03 abcdef.jsp
drwxr-xr-x. 2 root root 4096 Oct 11 12:02 bookCatalogue
-rw-r--r--. 1 root root 7290 Oct 11 12:02 index.jsp
drwxr-xr-x. 2 root root 4096 Oct 11 12:02 web
[[email protected] test]# rm -rf *