Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #71670

Re: Migrating to new machine

From Jolly Roger <jollyroger@pobox.com>
Newsgroups comp.sys.mac.system, uk.comp.sys.mac
Subject Re: Migrating to new machine
Date 2015-03-20 13:14 +0000
Organization People for the Ethical Treatment of Pirates
Message-ID <cn2kq8Fg7j0U3@mid.individual.net> (permalink)
References (1 earlier) <1m1ji3s.17m2zzwjyzcj3N@de-ster.xs4all.nl> <cn0cinFrucnU5@mid.individual.net> <1m1jrkk.1wx181f13on8hjN@de-ster.xs4all.nl> <mefbhf$fhm$1@news.albasani.net> <9usstb-2m4.ln1@news.chingola.ch>

Cross-posted to 2 groups.

Show all headers | View raw


On 2015-03-20, Paul Sture <nospam@sture.ch> wrote:
> On 2015-03-19, Aldo Raine <apache@scalpem.net> wrote:
>
>> Why wouldn't you want to sudo?
>
> When you want to string a load of commands together, although that's
> not the case here.
>
> A simple example I recently encountered on Linux:
>
> sudo rsync ... # backup entire system
>
> I changed that to:
>
> sudo time rsync ... # I want to see how long it takes
>
> here the sudo applies to the time command not the rsync, so the rsync
> throws errors when it tries to access files which need root access.
>
> For this example, it's simply a matter of putting the 'time' command
> first.
>
> time sudo rsync ...
>
> Other cases don't have such an easy workaround.

Why not just run the commands in a shell?:

sudo sh -c 'time whoami'

Works fine for me.

-- 
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

Back to comp.sys.mac.system | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Migrating to new machine John McWilliams <jpmcw@comcast.net> - 2015-03-19 06:52 -0700
  Re: Migrating to new machine nospam@de-ster.demon.nl (J. J. Lodder) - 2015-03-19 16:37 +0100
    Re: Migrating to new machine Jolly Roger <jollyroger@pobox.com> - 2015-03-19 16:41 +0000
      Re: Migrating to new machine nospam@de-ster.demon.nl (J. J. Lodder) - 2015-03-19 20:09 +0100
        Re: Migrating to new machine Aldo Raine <apache@scalpem.net> - 2015-03-19 16:28 -0400
          Re: Migrating to new machine me@home.spamsucks.ca (Király) - 2015-03-19 20:45 +0000
          Re: Migrating to new machine JF Mezei <jfmezei.spamnot@vaxination.ca> - 2015-03-19 17:32 -0400
            Re: Migrating to new machine Jolly Roger <jollyroger@pobox.com> - 2015-03-20 13:07 +0000
              Re: Migrating to new machine JF Mezei <jfmezei.spamnot@vaxination.ca> - 2015-03-20 11:53 -0400
                Re: Migrating to new machine Jolly Roger <jollyroger@pobox.com> - 2015-03-20 16:27 +0000
                Re: Migrating to new machine JF Mezei <jfmezei.spamnot@vaxination.ca> - 2015-03-20 13:23 -0400
              Re: Migrating to new machine Lewis <g.kreme@gmail.com.dontsendmecopies> - 2015-03-20 19:23 +0000
          Re: Migrating to new machine Paul Sture <nospam@sture.ch> - 2015-03-20 07:56 +0100
            Re: Migrating to new machine Lewis <g.kreme@gmail.com.dontsendmecopies> - 2015-03-20 11:20 +0000
            Re: Migrating to new machine Jolly Roger <jollyroger@pobox.com> - 2015-03-20 13:14 +0000
              Re: Migrating to new machine Lewis <g.kreme@gmail.com.dontsendmecopies> - 2015-03-20 19:25 +0000
        Re: Migrating to new machine Jolly Roger <jollyroger@pobox.com> - 2015-03-19 20:39 +0000
          Re: Migrating to new machine richard@cogsci.ed.ac.uk (Richard Tobin) - 2015-03-19 21:23 +0000
            Re: Migrating to new machine richard@cogsci.ed.ac.uk (Richard Tobin) - 2015-03-19 21:25 +0000
          Re: Migrating to new machine nospam@de-ster.demon.nl (J. J. Lodder) - 2015-03-20 09:32 +0100
            Re: Migrating to new machine Lewis <g.kreme@gmail.com.dontsendmecopies> - 2015-03-20 11:22 +0000
              Re: Migrating to new machine nospam@de-ster.demon.nl (J. J. Lodder) - 2015-03-20 13:10 +0100
                Re: Migrating to new machine Jolly Roger <jollyroger@pobox.com> - 2015-03-20 13:21 +0000
                Re: Migrating to new machine Lewis <g.kreme@gmail.com.dontsendmecopies> - 2015-03-20 19:19 +0000
                Re: Migrating to new machine nospam@de-ster.demon.nl (J. J. Lodder) - 2015-03-21 11:10 +0100
                Re: Migrating to new machine Jolly Roger <jollyroger@pobox.com> - 2015-03-21 13:18 +0000
                Re: Migrating to new machine nospam@de-ster.demon.nl (J. J. Lodder) - 2015-03-21 14:40 +0100
                Re: Migrating to new machine Jolly Roger <jollyroger@pobox.com> - 2015-03-21 13:43 +0000
                Re: Migrating to new machine nospam@de-ster.demon.nl (J. J. Lodder) - 2015-03-21 17:33 +0100
            Re: Migrating to new machine Jolly Roger <jollyroger@pobox.com> - 2015-03-20 13:18 +0000
              Re: Migrating to new machine Warren Oates <warren.oates@gmail.com> - 2015-03-20 10:10 -0400
                Re: Migrating to new machine Jolly Roger <jollyroger@pobox.com> - 2015-03-20 14:32 +0000
                Re: Migrating to new machine Warren Oates <warren.oates@gmail.com> - 2015-03-20 11:35 -0400
                Re: Migrating to new machine nospam <nospam@nospam.invalid> - 2015-03-20 12:30 -0400
  Re: Migrating to new machine me@home.spamsucks.ca (Király) - 2015-03-19 16:33 +0000
    Re: Migrating to new machine Jolly Roger <jollyroger@pobox.com> - 2015-03-19 16:40 +0000
  Re: Migrating to new machine nospam@de-ster.demon.nl (J. J. Lodder) - 2015-03-22 10:46 +0100
    Re: Migrating to new machine John McWilliams <jpmcw@comcast.net> - 2015-03-22 13:45 -0700

csiph-web