<p>Okay, I will say that the gem in this discussion is the little know command: tee</p>
<p>If you ever find yourself using vim to read a file owned by root and then want to edit it, can do so and write to the file as root using...<br>
:w !sudo tee %</p>
<p>How that words is...<br>
:w !command - writes the content of the buffer as the pipe input to command.<br>
% - is a register that gets substituted with the current file path<br>
tee - see: man tee</p>
<div class="gmail_quote">On May 20, 2012 10:37 AM, &quot;Shawn&quot; &lt;<a href="mailto:taaj.shawn@gmail.com">taaj.shawn@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you have a distro that uses sudo by default you will run into issues with redirection. Take a look at this article it explains a couple methods for redirecting output. I use the tee method. <a href="http://psas.pdx.edu/SudoSetup/" target="_blank">http://psas.pdx.edu/SudoSetup/</a><br>

------Original Message------<br>
From: Drifter<br>
Sender: <a href="mailto:ale-bounces@ale.org">ale-bounces@ale.org</a><br>
To: <a href="mailto:ale@ale.org">ale@ale.org</a><br>
ReplyTo: Atlanta Linux Enthusiasts<br>
Subject: [ale] bash commands<br>
Sent: May 18, 2012 5:27 PM<br>
<br>
I keep reminding myself that I don&#39;t begin to know what I think I know! :(<br>
<br>
I am about to upgrade this box, finally from FC 13 to FC 14.<br>
Ought to be simple enough.  I have the CD, which I think will do a clean<br>
install onto a software RAID.<br>
<br>
Prior to that I really ought to have on hand a list of all the installed<br>
packages.<br>
<br>
So I created a file &lt;app_list.txt&gt; on the Desktop and then tried this:<br>
<br>
yum list installed | ~/Desktop/app_list.txt<br>
and got back this<br>
<br>
bash: /home/kilpatms/Desktop/app_list.txt: Permission denied<br>
<br>
WTF!<br>
<br>
So I checked the perms on the existing (empty) file and they were correct.<br>
Then I tried the same thing as root, expanding the ~/ and got the same<br>
response.<br>
<br>
So, How DO I make yum throw a list of the installed packages to a text file<br>
rather than to the terminal?<br>
<br>
Sean<br>
<br>
<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br>
Sent via BlackBerry<br>
<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</blockquote></div>