bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Bug#149454: uudecode bug (?)


From: Paul Eggert
Subject: Re: Bug#149454: uudecode bug (?)
Date: Wed, 10 Jul 2002 01:02:57 -0700 (PDT)

> Date: Wed, 10 Jul 2002 08:59:52 +0200
> From: martin f krafft <address@hidden>
> 
> i do have problems coming up with UNIX programs that overwrite
> rather than unlink first.  we can basically ignore the filter
> proggies like cut, tr, sed, and friends, so among the more
> frequently used UNIX commands are: cp, mv, and `ln -f`. these all
> unlink first if the destination already exists.

cp doesn't; it overwrites.  mv and ln are special cases, since they
typically deal with names of files, not their contents.  mv is
typically a front end for the rename system call; ln for the link
system call.

Perhaps the most commonly used Unix command is the shell, and it
overwrites by default; e.g. 'echo foo >file'.

> what standard POSIX/UNIX/GNU commands overwrite rather than replace?
> editors, okay, but else?

Almost every command that writes a file (as opposed to renaming it)
overwrites rather than replaces.  The commands that come to mind are
awk, csplit, sed, sh, sort, split, tee, touch, uudecode, uniq, and
yacc.  It's pretty much any program that invokes fopen for write
access, or open for write access (unless both O_CREAT and O_EXCL are
given).  It's the normal case for writing.



reply via email to

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