caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Allsopp <dra-news@metastack.com>
To: "caml-list@yquem.inria.fr" <caml-list@yquem.inria.fr>
Subject: RE: [Caml-list] More re GC hanging
Date: Sun, 15 Aug 2010 11:17:20 +0000	[thread overview]
Message-ID: <E51C5B015DBD1348A1D85763337FB6D92774A9@Remus.metastack.local> (raw)
In-Reply-To: <AANLkTi=THbdWiXf=m8puWou2swFiDXLTHP2W=ta-0_TB@mail.gmail.com>

Adrien wrote:
> Hi,

<snip>

> Also, on my computer, I have the following behaviour:
>     11:44 ~ % sudo echo 0 > /proc/sys/kernel/randomize_va_space
>     zsh: permission denied: /proc/sys/kernel/randomize_va_space
>     root@jarjar:~# echo 0 > /proc/sys/kernel/randomize_va_space
>     root@jarjar:~#
> I can't use sudo to write to most files in /proc or /sys: I have to log in
> as root ('su -' does the job just fine).

The redirection (> /proc/sys...) is not part of the sudo invocation, it's a separate instruction to the *shell* to redirect output of the previous part of the command to a file and so it runs with *your* uid. There are two ways to achieve what you're after - one verbose one described in the sudo man page (essentially you pass the whole command line to sudo quoted) or the easier way:

echo 0| sudo tee /proc/sys/kernel/randomize_va_space

You can add > /dev/null if tee's outputting of the 0 to stdout is for some reason annoying.


David


  reply	other threads:[~2010-08-15 11:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-15  5:57 Paul Steckler
2010-08-15  7:03 ` [Caml-list] " Basile Starynkevitch
2010-08-15  8:34   ` Paul Steckler
2010-08-15  8:40   ` Paul Steckler
2010-08-15  9:16     ` Basile Starynkevitch
     [not found]       ` <AANLkTi=-8ZcxSy08fsh8wkTvscGLYzBsqN07OmOi5o6d@mail.gmail.com>
2010-08-15  9:55         ` Fwd: " Paul Steckler
2010-08-15 10:41           ` Fwd: " Sylvain Le Gall
2010-08-15 11:32             ` [Caml-list] " Vincent Hanquez
2010-08-15 10:45       ` [Caml-list] " Adrien
2010-08-15 11:17         ` David Allsopp [this message]
2010-08-15 12:12         ` Basile Starynkevitch
2010-09-01 15:24         ` Damien Doligez
2010-09-01 16:44           ` Adrien
2010-08-15 10:19     ` rixed
2010-08-20 15:21   ` Richard Jones
2010-08-20 23:30     ` Eray Ozkural
2010-08-22 13:02       ` Adrien
2010-08-25 15:17         ` Goswin von Brederlow
2010-08-18 12:22 ` Goswin von Brederlow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E51C5B015DBD1348A1D85763337FB6D92774A9@Remus.metastack.local \
    --to=dra-news@metastack.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).