Koozali.org: home of the SME Server

cp & rm defaults

aussie

cp & rm defaults
« on: February 13, 2004, 03:46:50 AM »
(I hope this is not too DUMB!)

Both cp and rm have the -i parameter to interactively check each file before action.

Sme setups seem to have this by default:
how do you override it, as I WANT to be able to
rm *.xxx to remove all .xxx files without interaction.

TIA Rob  :pint:

Offline ddougan

  • *
  • 155
  • +0/-0
    • http://www.DouganConsulting.com
cp & rm defaults
« Reply #1 on: February 13, 2004, 04:28:51 AM »
Use the -f option (for force).
Des Dougan

Offline grand-pa

  • *
  • 190
  • +0/-0
    • SME Server Fr
cp & rm defaults
« Reply #2 on: February 13, 2004, 05:07:15 AM »
If you want to definitly modify these options, you can edit ~/.bashrc and remove or comment the 3 aliases. :hammer:
SME Server v7.4 Server and gateway
Shuttle K45, Celeron E1400, 2x1Go DDR2, 2x250 Go SATA2 RAID-1

Offline raem

  • *
  • 3,972
  • +4/-0
cp & rm defaults
« Reply #3 on: February 13, 2004, 05:08:26 AM »
You could have done
man rm
at the command prompt to find out the correct syntax required, as you can also do with most other commands, assuming that a manual page(s) exist for it.

Regs
Ray
...

Anonymous

cp & rm defaults
« Reply #4 on: February 13, 2004, 05:10:12 AM »
Quote from: "ddougan"
Use the -f option (for force).


i tried that ! still get 'overwrite' prompt.
regards Rob

Offline raem

  • *
  • 3,972
  • +4/-0
cp & rm defaults
« Reply #5 on: February 13, 2004, 05:19:56 AM »
What command are you actually entering ?

This works OK for me
rm -f 1.*
which deletes 1.msg and 1.txt without prompting
or
rm -f *.msg
deletes all *.msg files without prompting
Regs
Ray
...

Anonymous

cp & rm defaults
« Reply #6 on: February 13, 2004, 05:20:06 AM »
Quote from: "grand-pa"
If you want to definitly modify these options, you can edit ~/.bashrc and remove or comment the 3 aliases. :hammer:


GoodOnYa Grand-Pa !! THATS what I wanted.

oh and Ray, i DID man and info before posting but either the bashrc aint there or i missed it.

Anyway THERE IT IS BOLD AS BRASS in /root/.bashrc
alias cp='cp -i'
so I #'d that out and I am happy !!

thanks to all,
Robert