cp: incorrect behaviour when copying recursively

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The "cp -r <src> <dst>" command omits top directory, when the trailing "/" is 
present in the <src> string. Here is the test case:

	barebox@barebox sandbox:/test mkdir d1
	barebox@barebox sandbox:/test echo -o d1/f1 1
	barebox@barebox sandbox:/test mkdir d2       
	barebox@barebox sandbox:/test cd d2
	barebox@barebox sandbox:/test/d2 cp -r ../d1/ . 
	barebox@barebox sandbox:/test/d2 ls
	.     ..    f1    
	barebox@barebox sandbox:/test/d2 cp -r ../d1 . 
	barebox@barebox sandbox:/test/d2 ls
	.     ..    d1    f1    

	barebox@barebox sandbox:/test/d2 version 
	
	barebox 2017.04.0-00169-g90e7a35e6 #1 Fri Apr 14 12:46:09 MSK 2017

Regards,
Peter

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux