linux cp command interactive option

January 24th, 2006 by Rohan

I used to always wonder why the –interactive option available for the cp command is not on by default. I’m not talking of any specific distro, but the default mode in which cp operates, which is to overwrite any destination files if they already exist. A particular distro can override this behaviour by specifying an alias in the system wide bashrc file.

I guess its this way to aid shell scripts which don’t want no interactiveness in them. Which leads me to thinking about the other available commands and their default overwrite option. Like gzip (default is interactive). Like mv and rm (default is non-interactive).

So should it be up to the distro to provide default options depending on the intended use? Maybe.

[Post to Twitter] Tweet This Post  [Post to Facebook] Facebook 

Leave a Reply




Tweet This Post links powered by Tweet This v1.4.1, a WordPress plugin for Twitter.