<div dir="ltr">I'm sure everybody knows this one, but when I forget to put "sudo" at the start of a command, and that command subsequently fails, I just type <div><br></div><div>sudo !!</div><div><br></div><div>
instead of re-typing the entire command.  I use this simple trick a lot.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 15 July 2014 13:00, Joe Wennechuk <span dir="ltr"><<a href="mailto:youcanreachmehere@hotmail.com" target="_blank">youcanreachmehere@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Yes.. I love this little bit here. Thank you very much for it. I Have begun to use it regularly. Very Nice. <div><br></div><div>I love these little tips, and tricks. Does anyone else have any neat tricks they use to make life easier? Does anyone know any more such magical expressions?<br>
<br><div><hr>From: <a href="mailto:timdaman@gmail.com" target="_blank">timdaman@gmail.com</a><br>Date: Sun, 13 Jul 2014 18:50:29 -0400<br>To: <a href="mailto:kwlug-disc@kwlug.org" target="_blank">kwlug-disc@kwlug.org</a><br>
Subject: Re: [kwlug-disc] Switching Jobs from Debian Shop to RHEL?<br><br><div dir="ltr"><div><div><div><div><div><div><div><div><div>To add to William's hint...<br><br></div>You will find yourself editing something at some point and suddenly realize, when saving, your don't have permissions to edit it. Normally one will end up writing to /tmp, quitting, sudoing to root (sudo -i), catting the /tmp file over the original, and dropping privileges again. <br>


<br></div>There is a better way<br></div>   :w !sudo tee %<br><br></div>:w: Write a file (in vi speak)<br></div>!: specify that a pipe should be used to write the file<br></div>sudo: Become root<br></div>tee: take standard input and copy it to a file<br>


</div>%: expands to the current file open in the buffer (vi function)<br><br></div><div>I am embarrassed to say how often I use this trick.<br></div>--Tim<br></div><div><br clear="all"><div>--Tim</div>


<br><br><div>On Sun, Jul 13, 2014 at 5:14 PM, William Park <span dir="ltr"><<a href="mailto:opengeometry@yahoo.ca" target="_blank">opengeometry@yahoo.ca</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">


<div><div>On Sun, Jul 13, 2014 at 01:59:45PM -0400, Chris Craig wrote:<br>
> On 13 July 2014 12:52, William Park <<a href="mailto:opengeometry@yahoo.ca" target="_blank">opengeometry@yahoo.ca</a>> wrote:<br>
><br>
> > Hands-on is the best way.  It won't take long, if you already know one<br>
> > Linux.  Most of "issues" you'll face will be how it interacts with other<br>
> > machines.  And, that's something you can't learn in isolation.<br>
><br>
> I've used Debian/Ubuntu at work for the last three jobs I've had, but<br>
> still use Slackware at home. Well I did use Slackware for the first of<br>
> the three but there were some issues with cross compiling so switched<br>
> to Debian. I played around with Red Hat as my first Linux distro but<br>
> ultimately didn't like it too much - that was over 10 years ago<br>
> though. The most trouble I had was with dependency resolution. I'd<br>
> rather solve dependencies manually with Slackware than try to get rpm<br>
> to recognize that they're resolved, or not as the case may be.<br>
><br>
> There are things I tolerate at work that I wouldn't at home, but<br>
> they're different use cases. Unity is too flaky and I never liked<br>
> their unified application menu or task switcher, but there are limited<br>
> applications that I use so it's not too bad. At home I wouldn't find<br>
> it usable.<br>
><br>
> One of the major differences you might find is if you're dependent on<br>
> "sudo" for a lot of things, it's not used so much outside of Ubuntu. I<br>
> use sudo at work and not really at home. I've found that Red Hat<br>
> doesn't upgrade well.<br>
><br>
> You might find this interesting, Joe:<br>
> <a href="http://unix.stackexchange.com/questions/57849" target="_blank">http://unix.stackexchange.com/questions/57849</a><br>
<br>
</div></div>A fellow Slackware users... howdy. :-)<br>
<br>
Here's some thought on "sudo" off top of my head (in case you don't get<br>
straight root access):<br>
    - sudo -i<br>
    - sudo -e   --> edit file<br>
    - visudo    --> edit /etc/sudoers.  I add "NOPASSWD:" to avoid<br>
      typing password.<br>
    - vipw [-s]<br>
    - vigr [-s]<br>
<span><font color="#888888">--<br>
William<br>
</font></span><div><div><br>
<br>
_______________________________________________<br>
kwlug-disc mailing list<br>
<a href="mailto:kwlug-disc@kwlug.org" target="_blank">kwlug-disc@kwlug.org</a><br>
<a href="http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org" target="_blank">http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</a><br>
</div></div></blockquote></div><br></div>
<br>_______________________________________________
kwlug-disc mailing list
<a href="mailto:kwlug-disc@kwlug.org" target="_blank">kwlug-disc@kwlug.org</a>
<a href="http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org" target="_blank">http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</a></div></div>                                       </div></div>
<br>_______________________________________________<br>
kwlug-disc mailing list<br>
<a href="mailto:kwlug-disc@kwlug.org">kwlug-disc@kwlug.org</a><br>
<a href="http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org" target="_blank">http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</a><br>
<br></blockquote></div><br></div>