Why does 'cp -f' not work anymore?
Chris W. Parker
cparker at swatgear.com
Thu Nov 3 17:57:53 UTC 2005
Michael Velez <mailto:mikev777 at hotmail.com>
on Thursday, November 03, 2005 4:19 AM said:
> cp()
> {
> [ $((`expr " $*" : '.* -[a-zA-Z]*f[a-zA-Z]* .*'`)) -ne 0 ] ||
> [ $((`expr " $*" : '.* --force .*'`)) -ne 0 ] ||
> set -- -i ${1+"$@"}
> command cp "$@"
> }
>
> This function checks for --force and -f anywhere on the command line,
> as well as it allows options to be combined with -f, such as -rfv.
Awesome!
Thanks Cameron and Michael.
Chris.
More information about the redhat-list
mailing list