LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News
User Name
Password
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.

Notices


Reply
  Search this Thread
Old 07-18-2011, 02:00 PM   #1
LXer
LXer NewsBot
 
Registered: Dec 2005
Posts: 114,891

Rep: Reputation: 118Reputation: 118
LXer: Video Tip – Using Pipes With The sudo Command


Published at LXer:

Now, if you’ve ever tried to use sudo to run a command sequence such as a pipeline, where each step required superuser priveleges, you probably got a Permission denied error. This is because sudo only applies to the first command in the sequence and not the others. There are multiple ways to handle this, but there are two that stand out to me. First, you can use sudo to start a shell (such as bash) with root priveleges, and then give that shell the command string. This can be done using the -c option of bash. To illustrate how this works, I’ll start out using sudo to run cat on a file that I created in the /root directory that I normally wouldn’t have access to.

Read More...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Using Bash To Feed Command Output To A While Loop Without Using Pipes! LXer Syndicated Linux News 0 08-06-2008 12:10 PM
LXer: Video tip from RHCEs: Kickstarting with Dell LXer Syndicated Linux News 0 08-09-2007 11:01 PM
LXer: Video tip from RHCEs: Firewalls LXer Syndicated Linux News 0 08-02-2007 12:32 PM
LXer: Video tip from RHCEs: Use Linux and OpenVPN to create a secure tunnel LXer Syndicated Linux News 0 07-20-2007 05:01 AM
LXer: Video tip from RHCEs: Frozen SSH sessions LXer Syndicated Linux News 0 07-06-2007 11:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News

All times are GMT -5. The time now is 05:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration