<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>This bit of kung fu is going in my toolbox.<br><br><div><hr id="stopSpelling">From: timdaman@gmail.com<br>Date: Sun, 13 Jul 2014 18:50:29 -0400<br>To: kwlug-disc@kwlug.org<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 class="ecxgmail_extra"><br clear="all"><div>--Tim</div>


<br><br><div class="ecxgmail_quote">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 class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">

<div class="ecxHOEnZb"><div class="h5">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">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 class="ecxHOEnZb"><font color="#888888">--<br>
William<br>
</font></span><div class="ecxHOEnZb"><div class="h5"><br>
<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>
</div></div></blockquote></div><br></div>
<br>_______________________________________________
kwlug-disc mailing list
kwlug-disc@kwlug.org
http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</div>                                        </div></body>
</html>