bin/53475: cp(1) copies files in reverse order to destination
Louis Mamakos
louie at TransSys.COM
Wed Jun 18 19:10:13 PDT 2003
>Number: 53475
>Category: bin
>Synopsis: cp(1) copies files in reverse order to destination
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Jun 18 19:10:10 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Louis Mamakos
>Release: FreeBSD 4.8-STABLE i386
>Organization:
>Environment:
System: FreeBSD whizzo.transsys.com 4.8-STABLE FreeBSD 4.8-STABLE #6: Sun Apr 6 11:00:39 EDT 2003 louie at whizzo.transsys.com:/a/obj/usr/src/sys/WHIZZO i386
>Description:
The cp(1) command produces surprising behavior when copying multiple
files to a destinationd directory. The files are copied in reverse
order. This is of consequence when the order of files in a directory
has meaning; e.g., in an mp3 player appliance the sequentially plays
files in an MS-DOS filesystem directory.
This is very counter-intuitive to the user.
>How-To-Repeat:
mkdir /tmp/foo /tmp/bar
touch /tmp/foo/1 /tmp/foo/2 /tmp/foo/3 /tmp/foo/4 /tmp/foo/5 /tmp/foo/6
cp -v /tmp/foo/1 /tmp/foo/2 /tmp/foo/3 /tmp/foo/4 /tmp/foo/5 /tmp/foo/6 /tmp/bar
>Fix:
BTFOM. Sneaking suspicion that mastercmp() and related callers are
implicated in this.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list