Peter D. wrote: > Jan Engelhardt wrote: > > by default, coreutils cp will overwrite a file. Hence I put in > > alias cp='/bin/cp -i' > > into the system-wide profile.
I always find it very annoying when distros or local admins do that kind of thing. I causes me to need to undo all of that in my own .profile et al files. I end up having a rather full environment file simply to clean out the trash! Why is it scary that cp will overwrite a file? rm removes files. mv moves files. cp copies files. ln links files. tee writes files. ed edits files. The shell's '>' redirects output to files. If you never reuse disk space then the bit bucket fills up. > > However, users wishing to override the now-system-default of > > interactivity cannot do so > > They can do so, by using the full path name of the command. > On my system, > > /bin/cp fileA fileB > > does what you want. By calling it /bin/cp you are avoiding the alias. But it is a full path and hard coding full paths into your finger memory is not a good habit to get into because some commands move around. (Such as grep and basename for examples.) The alias can also be avoided by: unalias cp command cp \cp 'cp' "cp" env cp All of those also avoid the alias. Bob _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
