On Fri, Nov 22, 2024 at 15:25:49 -0500, Roy J. Tellason, Sr. wrote:
> Why would you want to append to a file that some other program is also
> writing to? Sounds messy...
Opening a file in append mode has the following behavior:
O_APPEND
The file is opened in append mode
On Thursday 21 November 2024 02:16:48 pm Greg Wooledge wrote:
> On Thu, Nov 21, 2024 at 19:55:04 +0100, to...@tuxteam.de wrote:
> > On Thu, Nov 21, 2024 at 06:44:37PM +, Darac Marjal wrote:
> >
> > [...]
> >
> > > If it helps, "sponge" (in the moreutils package) seems to offer the right
> > >
On Thu, Nov 21, 2024 at 02:16:48PM -0500, Greg Wooledge wrote:
> On Thu, Nov 21, 2024 at 19:55:04 +0100, to...@tuxteam.de wrote:
> > On Thu, Nov 21, 2024 at 06:44:37PM +, Darac Marjal wrote:
> >
> > [...]
> >
> > > If it helps, "sponge" (in the moreutils package) seems to offer the right
> >
On Thu, Nov 21, 2024 at 19:55:04 +0100, to...@tuxteam.de wrote:
> On Thu, Nov 21, 2024 at 06:44:37PM +, Darac Marjal wrote:
>
> [...]
>
> > If it helps, "sponge" (in the moreutils package) seems to offer the right
> > interface here:
>
> [...]
>
> Oh, wow -- thanks for that little gem!
For
On Thu, Nov 21, 2024 at 06:44:37PM +, Darac Marjal wrote:
[...]
> If it helps, "sponge" (in the moreutils package) seems to offer the right
> interface here:
[...]
Oh, wow -- thanks for that little gem!
Cheers
--
t
signature.asc
Description: PGP signature
On Thu, Nov 21, 2024 at 01:35:15PM +0100, to...@tuxteam.de wrote:
On Thu, Nov 21, 2024 at 07:22:53AM -0500, g...@wooledge.org wrote:
On Thu, Nov 21, 2024 at 09:48:06 +0100, to...@tuxteam.de wrote:
[...]
> My favourite is actually "sudo dd of=" it hasn't the side effect
> of flooding your std
On 2024-11-21 20:15, Greg Wooledge wrote:
On Thu, Nov 21, 2024 at 08:14:35 +0100, Erwan David wrote:
On Thu, Nov 21, 2024 at 07:39:33AM CET, Bitfox
said:
>
> BTW, what’s the difference between [[ ]] and [ ] here? I know only the
> latter.
IIRC, [[ ]] is a bash/zsh builtin, [ ] is /bin/[ other
g...@wooledge.org (12024-11-21):
> Checking my local Debian man pages now, however, I see that Debian's dd
> (GNU coreutils) *does* offer an append option.
>
> dd oflag=append conv=notrunc of="$file"
>
> So I guess that's another viable choice, as long as your target system
> has GNU coreutil
On Thu, Nov 21, 2024 at 07:22:53AM -0500, g...@wooledge.org wrote:
> On Thu, Nov 21, 2024 at 09:48:06 +0100, to...@tuxteam.de wrote:
[...]
> > My favourite is actually "sudo dd of=" it hasn't the side effect
> > of flooding your stdout (esp. with a larger, uglier thing).
Thanks for all the detai
On Thu, Nov 21, 2024 at 09:48:06 +0100, to...@tuxteam.de wrote:
> On Thu, Nov 21, 2024 at 08:32:30AM +, Michael Kjörling wrote:
> > On 20 Nov 2024 17:49 -0500, from g...@wooledge.org (Greg Wooledge):
> > >> sudo echo "something" >>/etc/postfix/virtual_alias_maps
> > >
> > >> Can you help me wh
On Thu, Nov 21, 2024 at 08:14:35 +0100, Erwan David wrote:
> On Thu, Nov 21, 2024 at 07:39:33AM CET, Bitfox said:
> >
> > BTW, what’s the difference between [[ ]] and [ ] here? I know only the
> > latter.
>
> IIRC, [[ ]] is a bash/zsh builtin, [ ] is /bin/[ other name of
> /bin/test
That's part
On Thu, Nov 21, 2024 at 08:32:30AM +, Michael Kjörling wrote:
> On 20 Nov 2024 17:49 -0500, from g...@wooledge.org (Greg Wooledge):
> >> sudo echo "something" >>/etc/postfix/virtual_alias_maps
> >
> >> Can you help me why the first sudo failed?
> >
> > The redirection >> is being done before
On 20 Nov 2024 17:49 -0500, from g...@wooledge.org (Greg Wooledge):
>> sudo echo "something" >>/etc/postfix/virtual_alias_maps
>
>> Can you help me why the first sudo failed?
>
> The redirection >> is being done before sudo is executed.
Indeed.
The usual pattern if you need to do this in a non-
On Wed, Nov 20, 2024 at 9:42 PM Bitfox wrote:
>
> In my bash shell script, when I say:
>
> sudo echo "something" >>/etc/postfix/virtual_alias_maps
>
> it could not run with the prompts:
>
> bin/mask.sh: line 18: /etc/postfix/virtual_alias_maps: Permission denied
>
>
> but, if I just say:
>
> echo
On Thu, Nov 21, 2024 at 07:39:33AM CET, Bitfox said:
>
> BTW, what’s the difference between [[ ]] and [ ] here? I know only the
> latter.
IIRC, [[ ]] is a bash/zsh builtin, [ ] is /bin/[ other name of
/bin/test
--
Erwan David
On 2024-11-21 13:21, Jeffrey Walton wrote:
On Wed, Nov 20, 2024 at 9:42 PM Bitfox wrote:
In my bash shell script, when I say:
sudo echo "something" >>/etc/postfix/virtual_alias_maps
it could not run with the prompts:
bin/mask.sh: line 18: /etc/postfix/virtual_alias_maps: Permission
denied
On 11/20/24 17:49, Greg Wooledge wrote:
On Thu, Nov 21, 2024 at 06:17:31 +0800, Bitfox wrote:
sudo echo "something" >>/etc/postfix/virtual_alias_maps
https://mywiki.wooledge.org/BashPitfalls#pf53
Can you help me why the first sudo failed?
The redirection >> is being done before sudo is exe
Sounds like making bin/mask.sh executable by root ONLY might help you forget to
use sudo to run it
Sudo chmod /bin/mask.sh x=rshould do it
--
All the best
Keith Bainbridge
keithr...@gmail.com
+61 (0)447 667 468
GMT+ 10:00
Sent from my Aphone. Please excuse my brevity.
On 21 November 2
On Thu, Nov 21, 2024 at 06:17:31 +0800, Bitfox wrote:
> sudo echo "something" >>/etc/postfix/virtual_alias_maps
https://mywiki.wooledge.org/BashPitfalls#pf53
> Can you help me why the first sudo failed?
The redirection >> is being done before sudo is executed.
Hello,
In my bash shell script, when I say:
sudo echo "something" >>/etc/postfix/virtual_alias_maps
it could not run with the prompts:
bin/mask.sh: line 18: /etc/postfix/virtual_alias_maps: Permission denied
but, if I just say:
echo "something" >>/etc/postfix/virtual_alias_maps
and run tha
Hello
Russ Schneider (<[EMAIL PROTECTED]>) wrote:
> It seems that even with a standard sudo entry such as:
> user1localhost = (root) /usr/sbin/processd
>
> some processes will return "Only root should start processd".
You didn't forget to call "sudo processd" instead of "processd", did
you?
It seems that even with a standard sudo entry such as:
user1localhost = (root) /usr/sbin/processd
some processes will return "Only root should start processd".
Or, when giving a regular user permission to run something like lsof, lsof
will still only return the open files for that user, and
22 matches
Mail list logo