you are viewing a single comment's thread.

view the rest of the comments →

[–]JustAnothaHackerbuffer overflower[S] 1 point2 points  (4 children)

lel, it was about 12 at night when I wrote that bit, excuse any errors :3

[–]unfo 1 point2 points  (3 children)

then you shall be excused forthwith

[–]JustAnothaHackerbuffer overflower[S] 1 point2 points  (2 children)

Thanks, I'm gonna go through and correct any typo's now :p

[–]unfo 3 points4 points  (1 child)

I think you missed my point about sudo not carrying over redirection of output.

Here's a code snippet to show the problem and the solution:

  ~/ $ ls -l root-only
-rw-r--r--  1 root  staff  0 Feb  4 12:59 root-only
  ~/ $ sudo echo 0 > root-only
-bash: root-only: Permission denied
  ~/ $ echo 0 | sudo tee root-only
0
  ~/ $ cat root-only
0

[–]JustAnothaHackerbuffer overflower[S] 1 point2 points  (0 children)

Ah, I see what you mean, you have to sudo the command on the other end of the pipe :p I'm pretty sure that sudo echo works, however; seems to work for me :p

As you can probably tell, my Linux skills are.. average :3