bug-coreutils
[Top][All Lists]
Advanced

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

Re: cp command potental problem


From: Bauke Jan Douma
Subject: Re: cp command potental problem
Date: Thu, 18 Jun 2009 21:42:40 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090409)

Eric Blake wrote on 06/17/2009 08:43 PM:
According to Bob Proulx on 6/17/2009 11:12 AM:
If there are three program arguments then the last one must be a
directory or it is an error.  But with only two it isn't possible to
determine the caller's intention.

It is also possible to write shell functions or aliases so that you can
avoid some of these mistakes.  For example:

$ alias safe_copy='cp -n'
$ safe_copy file*.txt

~/tmp > touch foo bar
~/tmp > cp -n foo bar
cp: invalid option -- 'n'
Try `cp --help' for more information.
~/tmp > cp --version
cp (GNU coreutils) 6.10
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.


bjd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]