[Bug 801] Improve usability of scp by adding a "make path" option
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Fri Feb 27 01:47:23 EST 2004
http://bugzilla.mindrot.org/show_bug.cgi?id=801
Summary: Improve usability of scp by adding a "make path" option
Product: Portable OpenSSH
Version: -current
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P3
Component: scp
AssignedTo: openssh-bugs at mindrot.org
ReportedBy: sdturne at us.ibm.com
I would like to see an option added to scp that would cause the creation of any
non-existent directories leading up to the target file. For example if I run the
following command:
scp -p file.dat remote:some/new/dir/file.dat
and any part of the "some/new/dir/" path does not exist, an error is returned.
It would be very useful to have a new option, say "-m", that would cause scp to
automatically create the missing directories without requiring a separate "ssh
remote mkdir -p some/new/dir/" invocation.
I see this as a performance enhancement as well as a convenience. I have
scenarios where I might have thousands of separate scp invocations, and it's
very expensive to run a separate invocation of "ssh remote mkdir -p" to insure
the target path exists (not to mention the fact that the "mkdir -p" command is
not portable to all the platforms I deal with).
I understand that scp is the follow-on to rcp, and that rcp has no such option.
It has been suggested that this might be a "reason" NOT to implement such a
feature in scp. How disappointing to think that a replacement tool can never
improve on the original! The GNU folks have never taken this approach, and as
long as the new feature doesn't break backward compatibility I can't see the
logic in this argument.
I might also note that scp already has logic to create directories (used within
the -r logic), so perhaps the problem is already partially solved.
I hope this seems like a reasonable request, and thanks for your consideration.
Steve Turner
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the openssh-bugs
mailing list