Bash scripting problems

Tim Waugh twaugh at redhat.com
Mon Jan 10 11:08:27 UTC 2005


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 at cyberelk tim]$ mkdir arena
[tim at cyberelk tim]$ cd arena
[tim at cyberelk arena]$ touch dest
[tim at cyberelk arena]$ chmod 0 dest
[tim at cyberelk arena]$ touch src
[tim at cyberelk arena]$ cp -i src dest
cp: overwrite `dest', overriding mode 0000? y
cp: cannot create regular file `dest': Permission denied
[tim at cyberelk arena]$ cp -if src dest
cp: overwrite `dest', overriding mode 0000? y
[tim at cyberelk arena]$ 

Tim.
*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20050110/52f7cbd0/attachment-0002.bin 


More information about the users mailing list