如果在git bash中输入cp -r dir1 dir2不行,因为dir1文件夹本身已经包括在dir2中。而这种粘贴复制方式就是把文件夹全部复制过去。我只想把dir1(子文件夹)里的文件复制粘贴到dir2(上一层文件夹),请指教~
这样去试试.
cp -r dir1/* dir2
[root@wx dir2]# cp -r dir1/* ./
[root@wx dir2]# ll
total 0
-rw-r--r--. 1 root root 0 Aug 6 10:45 1.txt
-rw-r--r--. 1 root root 0 Aug 6 10:45 12.txt
-rw-r--r--. 1 root root 0 Aug 6 10:45 123.txt
drwxr-xr-x. 2 root root 48 Aug 6 10:45 dir1
谢谢大神们指教,已经解决了