Now on ScienceBlogs: Oldest Human-Made Object in Space

ScienceBlogs Book Club: Inside the Outbreaks

Greg Laden's Blog

Evolution, Life Sciences, Science Education, Human Evolution, and Stuff

Darwing_Face.jpg Learn more about Charles Darwin and his work.

Hornbill170.jpg Looking for stuff about birds?

Lion_mane170.jpg Lean more about lions

Congo_sidebar.jpg An archaeological expedition to the Congo


The Skeptical Search Engine


Nature Blog Network
Climate Defense Fund


The contents of Greg Laden's Blog are copyrighted by Greg Laden.

Recent Comments

Search

Profile


Click on "About" for the big picture, and "Archives" for the details.


Recent Posts

Blogroll

If you don't see yourself on my blogroll, just drop me a line and let me know. I'll add you.*
*Assuming that I'm on your blogroll, of course!

Archives

« Crazy Cuckoos Invade Europe | Main | Blogospherics »

As usual, quotes save the day in bash. And more.

Category: Computer TricksLinuxTechnologyone-liners
Posted on: March 31, 2009 7:30 PM, by Greg Laden

If you try to sudo your way through a command with pipes and/or redirects, part of the sequence of commands may be producing sudo-read/writeable streams of data or data objects, which the other parts of the sequence can't use because they were spawned by your shell and not root.

The solution is to embed the appropriate part of the command in quotes. Like this.

And here is the latest LJ video: The Find Command.

Share on Facebook
Share on StumbleUpon
Share on Facebook

TrackBacks

TrackBack URL for this entry: http://scienceblogs.com/mt/pings/104540

Comments

1

I love find -- but then again, I liked APL, too. They have a lot in common.

Posted by: D. C. Sessions | March 31, 2009 8:21 PM

2

I have always wanted to know how to make sudo do that. Great link.

Posted by: Wayne Conrad | April 1, 2009 3:34 PM

3

I find that the easiest way to get around issues with sudo is sudo passwd root. I'm old school like that. :)

Posted by: egaeus | April 4, 2009 12:32 AM

Post a Comment

(Email is required for authentication purposes only. On some blogs, comments are moderated for spam, so your comment may not appear immediately.)





ScienceBlogs

Search ScienceBlogs:

Go to:

Advertisement
Follow ScienceBlogs on Twitter

© 2006-2011 ScienceBlogs LLC. ScienceBlogs is a registered trademark of ScienceBlogs LLC. All rights reserved.