Re: cf & mv not working



"fredbear2412" <me@xxxxxxxxxxxxx> writes:
These commands stopped working a while back. didn't really bother me as I
just used text editor to copy stuff from one file to another.
Now I need cp or mv to work for a binary(?) file.


Here is what I get when I try & copy a file

/etc/mail # cp sendmail.cf sendmail.cf.org
cp: illegal option -- 1
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src target
cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src1 ... srcN directory

or if I try to rename

/etc/mail # mv sendmail.cf sendmail.cf.org
mv: illegal option -- 1
usage: mv [-f | -i | -n] [-v] source target
mv [-f | -i | -n] [-v] source ... directory

The solution: don't alias cp or mv to "cp -1" and "mv -1", respectively.

Have a look at your .cshrc or equivalent file and remove the
following commands that you have incorrectly added:
alias cp cp -1
alias mv mv -1

For a quick fix, try this in your shell:
unalias cp
unalias mv


Kind regards,
- Henrik

--
Good signatures never die, they just fade away
.



Relevant Pages

  • Re: Newbie: I want B&W "colours" please
    ... > things in both vi and bash? ... comment out, just override it later on, or unalias it. ... alias ls='ls -F' ... The "F" flag to ls is the predecessor of the coloured output and is ...
    (uk.comp.os.linux)
  • Re: Ubuntu 6.10 terminal window disabling colors?
    ... $ unalias <alias> ... If you want it to be permanent you will need to remove the alias from ... you are supposed to be able to turn colors ... http://aplawrence.com/Forum/TonyLawrence10.html "Controlling Linux ...
    (comp.os.linux.misc)
  • Re: Bash globbing files only?
    ... | I do have an alias for ls, but it's simply to add color. ... | unalias and get the same results. ... | bash but I hadn't played with globbing much. ... A viola burns longer. ...
    (Fedora)
  • Re: Newbie: I want B&W "colours" please
    ... >> things in both vi and bash? ... > comment out, just override it later on, or unalias it. ... > alias ls='ls -F' ... to get rid of all the ill-advised aliases some distros set. ...
    (uk.comp.os.linux)
  • Re: stopping confirmation on deletes
    ... Michael Heiming wrote: ... > 'unalias rm' should disable it temporarily, ... > bash' should have complete info. ... I found just that alias and a few other annoying ones in /etc/profile. ...
    (comp.os.linux.misc)