LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-07-2015, 11:43 AM   #1
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on freest; has been KDE, CLI, Novena but open... http://goo.gl/NqgqJx &c ;-)
Posts: 4,855
Blog Entries: 2

Rep: Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565
Question [code]sudo printf "..." >> text.etc[/code] ?


Thats not right...
I can delete text.etc as a (newb I mean) normal user.

I tried:
Code:
sudo 'printf "..." >> text.etc'
boy it did not like that.

Reason for Editing:
almost fixed code


Any help?

Last edited by jamison20000e; 08-07-2015 at 11:53 AM.
 
Old 08-07-2015, 01:07 PM   #2
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on freest; has been KDE, CLI, Novena but open... http://goo.gl/NqgqJx &c ;-)
Posts: 4,855

Original Poster
Blog Entries: 2

Rep: Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565
This goes over my head: http://serverfault.com/questions/634...ntly-with-sudo
This one I may get: http://unix.stackexchange.com/questi...nano-or-cp-can ...
nope, down the list http://stackoverflow.com/questions/8...ere-an-alterna
Code:
printf "..." | sudo tee .f.f
.f.f deletable by anyone
Code:
sudo sh -c 'printf "..." > .f.f'
nope
Code:
:~$ rm .f.f
rm: remove write-protected regular file .f.f? y
Code:
man tee
man sudo


Do I have to tell sudo to make a file as -u root or is that what it dose (usually?)

Last edited by jamison20000e; 08-07-2015 at 01:41 PM.
 
  


Reply

Tags
bash, sudo


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] When I type "sudo grub" it says "command not found" in Ubuntu 9.10 Live CD. msbstar Linux - Newbie 10 04-01-2020 11:54 PM
why "su" and "sudo" commands need to be Set-UID programs?? goldengriff Ubuntu 3 11-07-2013 03:52 AM
When I type "sudo grub" it says "command not found" in Ubuntu 10.10 poumtatalia Linux - Newbie 5 09-14-2010 05:21 PM
cannot "sudo apt-get uptate" or "sudo" anything! plz help mdguy21061 Linux - Newbie 7 04-13-2008 11:59 PM
how do I get around the "submit passwd" prompt in ubuntu even if I use "sudo"? t3gah Linux - Distributions 1 02-22-2005 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:02 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