Re: truncating files

1997-12-08 Thread Hamish Moffatt
On Sun, Dec 07, 1997 at 03:05:00PM -0500, Carl Mummert wrote: cmrm -f {list of filenames} cmtouch {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 to the

Re: truncating files

1997-12-08 Thread Robert D. Hilliard
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 |

Re: truncating files

1997-12-07 Thread Krzysztof Adamski
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) won't

Re: truncating files

1997-12-07 Thread William R Ward
-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 find one, I

Re: truncating files

1997-12-07 Thread William R Ward
-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 find one, I

Re: truncating files

1997-12-07 Thread Carl Mummert
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

Re: truncating files

1997-12-07 Thread Rick Macdonald
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 filenames}

Re: truncating files

1997-12-07 Thread Carl Mummert
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 cmWhat about: cm cmrm -f {list of filenames} cmtouch {list of filenames} This doesn't work if you

Re: truncating files

1997-12-07 Thread Robert D. Hilliard
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] .

Re: truncating files

1997-12-07 Thread hermit
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

Re: truncating files

1997-12-07 Thread hermit
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 Consulting

truncating files

1997-12-06 Thread Carl Mummert
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

Re: truncating files

1997-12-06 Thread Miquel van Smoorenburg
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 filename eg,

RE: truncating files

1997-12-06 Thread Ralph Winslow
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

Re: Big Bad Bug - adduser truncating files from /etc/skel.

1997-06-23 Thread Debian user mail
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]

Big Bad Bug - adduser truncating files from /etc/skel.

1997-06-21 Thread Dave Cinege
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

Re: Big Bad Bug - adduser truncating files from /etc/skel.

1997-06-21 Thread Dale Scheetz
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

Re: Big Bad Bug - adduser truncating files from /etc/skel.

1997-06-21 Thread Christian Meder
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, upgrade to