On Tue, Jun 03, 2003 at 09:53:42AM +0200, Erez Doron wrote:
> hi
> 
> the sysadmin has messed with the global .cshrc, and now when i do a 
> redirection, e.g. :
> echo hello > log
> i get :
> log: File exists.
> what do i need to unset to solved this ?

You need to unset the 'noclobber' shell variable. Quoting the relevant
bit from 'man csh': 

       > name
       >! name
       >& name
       >&! name
               The file name is used as standard output.  If the file does not
               exist then it is created; if the file exists, it is truncated,
               its previous contents being lost.                                       
                                          
               If  the shell variable noclobber is set, then the file must not
               exist or be a character  special  file  (e.g.,  a terminal  or
               `/dev/null')  or an error results.  This helps prevent acciden-
               tal destruction of files.  In this case the `!'  forms can  be
               used to suppress this check.  

               The  forms  involving  `&' route the diagnostic output into the
               specified file  as  well  as  the  standard  output. name  is
               expanded in the same way as `<' input filenames are.
-- 
Muli Ben-Yehuda
http://www.mulix.org

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to