From the bash manpage:
noclobber
If set, bash does not overwrite an existing file
with the >, >&, and <> redirection operators. This
variable may be overridden when creating output
files by using the redirection operator
On Sun, Dec 07, 1997 at 03:05:00PM -0500, Carl Mummert wrote:
> cm>rm -f {list of filenames}
> cm>touch {list of filenames}
>
> This doesn't work if you don't have write permission to the
> directory. The solution should be able to truncate any file
> I have write access to, even if I can't write
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Robert D. Hilliard) writes:
>> 1) I use set -C in bash, so I can't say > foo if foo exists wthout
>> first saying set +C.
> ">| foo" overrides the noclobber option
Don't you mean ">!", not ">|"??
--Bill.
--
William R Ward Bay View
The problem with removing and recreating is that if a program has that
file open for appending (e.g. logfiles), the file isn't actually
removed from the disk until that program closes its file descriptor.
So you end up with 3 problems:
1. The file still exists on disk, but is not linked to in any
> 1) I use set -C in bash, so I can't say > foo if foo exists wthout
> first saying set +C.
">| foo" overrides the noclobber option
Bob
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] .
Trouble? e-mail to [EMAIL PROTECTED] .
cm>>
cm>> 1) > foo
cm>> 2) cp /dev/null foo
cm>>
cm>> Problems:
cm>
cm>> 2) cp /dev/null foo won't take multiple filenames as arguments
cm>
cm>> So the answer is that I do need a script or program to do the job.
cm>
cm>What about:
cm>
cm>rm -f {list of filenames}
cm>touch {list of filenames}
Thi
On Sun, 7 Dec 1997, Carl Mummert wrote:
> Summary:
>
> 1) > foo
> 2) cp /dev/null foo
>
> Problems:
> 2) cp /dev/null foo won't take multiple filenames as arguments
> So the answer is that I do need a script or program to do the job.
What about:
rm -f {list of filenames}
touch {list of filen
Summary:
1) > foo
2) cp /dev/null foo
Problems:
1) I use set -C in bash, so I can't say > foo if foo exists wthout
first saying set +C.
2) cp /dev/null foo won't take multiple filenames as arguments
So teh answer is that I do need a script or program to do the job.
Carl
[EMAIL PROTECTED]
One
-BEGIN PGP SIGNED MESSAGE-
Carl Mummert <[EMAIL PROTECTED]> writes:
> Is there already a (standard) utility on a linux box to truncate a
> file to 0 bytes? [Besides echo -n "" > foo, which is 1) too long for
> my lazy fingers and 2) won't take multiple filenames ]
>
> Since I couldn't fi
-BEGIN PGP SIGNED MESSAGE-
Carl Mummert <[EMAIL PROTECTED]> writes:
> Is there already a (standard) utility on a linux box to truncate a
> file to 0 bytes? [Besides echo -n "" > foo, which is 1) too long for
> my lazy fingers and 2) won't take multiple filenames ]
>
> Since I couldn't fi
A very simple way is ">foo" (noquotes) works in bash. It also creates a
file.
Krzysztof
On Sat, 6 Dec 1997, Carl Mummert wrote:
> Is there already a (standard) utility on a linux box to truncate a
> file to 0 bytes? [Besides echo -n "" > foo, which is 1) too long for
> my lazy fingers and 2) w
Try this one:
>foo
or, for multiple file names:
for xxx in *
do
>$xxx
done
where * is any regular expression or:
for xxx in a b c d e f g.c h.o g.txt ...
do
>$xxx
done
If your finger are lazier than that, I'm afraid I can't help ;-)
On 06-Dec-97 Carl Mummert wrote:
>Is there already a (stan
In article <[EMAIL PROTECTED]>,
Carl Mummert <[EMAIL PROTECTED]> wrote:
>Is there already a (standard) utility on a linux box to truncate a
>file to 0 bytes? [Besides echo -n "" > foo, which is 1) too long for
>my lazy fingers and 2) won't take multiple filenames ]
Yeah, just use
> filen
Is there already a (standard) utility on a linux box to truncate a
file to 0 bytes? [Besides echo -n "" > foo, which is 1) too long for
my lazy fingers and 2) won't take multiple filenames ]
Since I couldn't find one, I wrote a little C program to do it, but I
am still interested in whether there
I reported this a few weeks ago. Adduser v3.3 should fix this, and should
be forthcoming from Guy Maor.
Pete
--
Peter J. Templin, Jr. Client Services Analyst
Computer & Communication Services tel: (717) 524-1590
Bucknell University [EMAIL PROTECTED]
On Jun 21, Dave Cinege wrote
> I finally had the need to add some users to my brand new 1.3.0 server.
>
> Using adduser everything copied from /etc/skel to /home/[user] gets
> hacked down to one line.
>
> I checked my other machine that was 1.2.6 based and the same thing happened.
>
Hi,
upgr
On Sat, 21 Jun 1997, Dave Cinege wrote:
> I finally had the need to add some users to my brand new 1.3.0 server.
>
> Using adduser everything copied from /etc/skel to /home/[user] gets
> hacked down to one line.
>
> I checked my other machine that was 1.2.6 based and the same thing happened.
>
I finally had the need to add some users to my brand new 1.3.0 server.
Using adduser everything copied from /etc/skel to /home/[user] gets
hacked down to one line.
I checked my other machine that was 1.2.6 based and the same thing happened.
.bash_profile:
--
# ~/.bash_profile: executed by bash
18 matches
Mail list logo