On Sat, Mar 11, 2000 at 10:35:50PM -0600, Dean Struss wrote: > Hi all: I too have a question on the cp command. When used it always > ask rm the file I'm trying to copy. Is cp copy or remove? Also can't > one specify a place on a directory with a new name to place a file in > a newly created file. I keep getting the response that directory > doesn't have a file of that name. TIA Dean
If cp is aliased to 'cp -i' then it will prompt you if you attempt to overwrite a file with the same name. It's pretty standard to have aliases for rm, mv, and cp that do this by default -- sort of "Are you sure?" kind of prompt. It can save you from permanently doing something stupid. If you're really sure you want to clobber the file(s) without getting prompted, you can use the '-f' or '--force' flags. Be careful though -- 'rm -rf /' will ruin your day! If the you're getting prompted to remove a destination file that doesn't exist, then I'd think something fishy was afloat. For more info, check the man pages for mv, cp, rm, rmdir, etc... -- +----------------------------------------------------+ | Eric G. Miller egm2@jps.net | | GnuPG public key: http://www.jps.net/egm2/gpg.asc | +----------------------------------------------------+