Re: Bash scripting problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 08, 2005 at 12:31:20PM -0700, Kevin Kempter wrote:

> You could also try 'rm -f' or 'cp -f' to avoid the prompts...

No, the '-f' option to cp(1) is not meant to do that.

[tim@cyberelk tim]$ mkdir arena
[tim@cyberelk tim]$ cd arena
[tim@cyberelk arena]$ touch dest
[tim@cyberelk arena]$ chmod 0 dest
[tim@cyberelk arena]$ touch src
[tim@cyberelk arena]$ cp -i src dest
cp: overwrite `dest', overriding mode 0000? y
cp: cannot create regular file `dest': Permission denied
[tim@cyberelk arena]$ cp -if src dest
cp: overwrite `dest', overriding mode 0000? y
[tim@cyberelk arena]$ 

Tim.
*/

Attachment: pgprttELRlBo8.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux