Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I get what you are saying: cp/scp should have consistent behavior when the second arg is a directory. The "problem" operation you describe is analogous to copying plain files, though (copying contents to a new name).

I don't think having to create a target directory first is obvious, although neither is the fact that bare "cp" doesn't copy directories.

Finally, for remote copying it would be a nightmare for scp to require the destination directory to exist. To copy a directory tree to a remote server with a new name you'd need to either ssh a remote mkdir command, or add a flag to scp to specify the new name.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: