<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LinuxNut.org &#187; command</title>
	<atom:link href="http://linuxnut.org/tag/command/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxnut.org</link>
	<description>Nuts about Linux and Stuff...</description>
	<lastBuildDate>Fri, 09 Apr 2010 15:52:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>umask</title>
		<link>http://linuxnut.org/2009/08/umask/</link>
		<comments>http://linuxnut.org/2009/08/umask/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 13:59:16 +0000</pubDate>
		<dc:creator>Bryce</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[umask]]></category>

		<guid isPermaLink="false">http://admin.linuxnut.org/?p=119</guid>
		<description><![CDATA[umask determines what permissions any new files or directories will have by default. Like file permissions, it historically takes an octal value (e.g. &#8216;umask 002&#8242;), but can also symbolic values (e.g. &#8216;umask a=rx,ug+w&#8217;). I&#8217;m going to just focus on the octal values.

The octal value appears to have a lower than what you&#8217;d normally set with [...]]]></description>
			<content:encoded><![CDATA[<p>umask determines what permissions any new files or directories will have by default. Like file permissions, it historically takes an octal value (e.g. &#8216;umask 002&#8242;), but can also symbolic values (e.g. &#8216;umask a=rx,ug+w&#8217;). I&#8217;m going to just focus on the octal values.<br />
<span id="more-119"></span><br />
The octal value appears to have a lower than what you&#8217;d normally set with chmod, but this is because it is actually subtracted from the maximum possible file (666) or directory (777) permissions.</p>
<p>For example if you create a new directory with umask set to 022, the resulting permissions are set to 755, since 777 &#8211; 022 = 755.</p>
<p>Most of the time umask is set sensibly from the beginning, and you don&#8217;t have to worry about it. If you do need to change it, you&#8217;ll probably find it being set in one of your login scripts &#8211; &#8216;/etc/profile&#8217; or &#8216;~/.bashrc&#8217;.</p>
<p>For more information just check the man page.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxnut.org/2009/08/umask/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FFmpeg</title>
		<link>http://linuxnut.org/2009/01/ffmpeg/</link>
		<comments>http://linuxnut.org/2009/01/ffmpeg/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 15:23:53 +0000</pubDate>
		<dc:creator>Bryce</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[FFmpeg]]></category>
		<category><![CDATA[transcode]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://admin.linuxnut.org/?p=46</guid>
		<description><![CDATA[FFmpeg is an open-source command line utility for performing audio/video file conversions. It can be used to simply convert straight from one video format to another, or to crop, pad, rescale, change bit-rates, merge or split out audio and video, and so on&#8230;
The projects website is at http://ffmpeg.mplayerhq.hu/. Here&#8217;s a few links to some of [...]]]></description>
			<content:encoded><![CDATA[<p>FFmpeg is an open-source command line utility for performing audio/video file conversions. It can be used to simply convert straight from one video format to another, or to crop, pad, rescale, change bit-rates, merge or split out audio and video, and so on&#8230;</p>
<p><span id="more-46"></span>The projects website is at <a href="http://ffmpeg.mplayerhq.hu/">http://ffmpeg.mplayerhq.hu/</a>. Here&#8217;s a few links to some of the most useful parts of the project&#8217;s own documentation:</p>
<ul>
<li><a href="http://ffmpeg.mplayerhq.hu/general.html">Supported file, image, video and audio formats</a></li>
<li><a href="http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html#TOC9">Video options</a></li>
<li><a href="http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html#TOC11">Audio options</a></li>
</ul>
<p>The simplest command format is &#8216;ffmpeg -i inputFile outputFile&#8217;, but it can be made as complex as required, in order to specify every single parameter of the conversion process.</p>
<p>To obtain the encoding details from an existing audio or video file, just run the command with only an input file specified, e.g.: ffmpeg -i somefile.avi</p>
<p>I&#8217;ll now list some commonly used parameters. These may do exactly what you need first time, but don&#8217;t be surprised if you have to tweak the parameters slightly for them to work on your system, with your files:</p>
<p><strong>Convert AVI video to MPEG:</strong></p>
<pre>ffmpeg -i inputFile.avi outputFile.mpg</pre>
<p><strong>Convert MPEG video to AVI:</strong></p>
<pre>ffmpeg -i inputFile.mpg outputFile.avi</pre>
<p><strong>Convert FLV to MPEG:</strong></p>
<pre>ffmpeg -i inputFile.flv -ab 56k -ar 22050 -b 500k -s 320x240 outputFile.mpg</pre>
<dl>
<dd>Audio bit-rate: 56kbps</dd>
<dd>Audio sampling frequency: 22050Hz</dd>
<dd>Video bit-rate: 500kbps</dd>
<dd>Video size: 320 x 240</dd>
</dl>
<p>&nbsp;<br />
<strong>Convert MPEG or AVI to FLV:</strong></p>
<pre>ffmpeg -i inputFile.avi -acodec mp3 -ar 22050 -f flv outputFile.flv</pre>
<dl>
<dd>Audio sampling frequency: 22050Hz</dd>
</dl>
<p>&nbsp;<br />
<strong>Convert AVI to MPEG-2 for DVD</strong><br />
Note that you will probably need to change the &#8216;target&#8217; and &#8216;aspect&#8217; to match your needs:</p>
<pre>ffmpeg -i inputFile.avi -target pal-dvd -aspect 16:9 outputFile.mpg</pre>
<p><strong>Convert sequence of JPEGs to MPEG:</strong><br />
Note that the image files in this example would named &#8216;pic-001.jpg, pic-002.jpg, etc&#8230;</p>
<pre>ffmpeg -f image2 -i pic-%d.jpg outputFile.mpg</pre>
<p><strong>Convert MPEG or AVI to sequence of JPEGs:</strong></p>
<pre>ffmpeg -i inputFile.mpg pic-%d.jpg</pre>
<p><strong>Convert MPEG or AVI to time-lapsed sequence of JPEGs, one per second:</strong></p>
<pre>ffmpeg -i inputFile.mpg -r 1 pic-%d.jpg</pre>
<dl>
<dd>Video frame-rate: 1fps</dd>
</dl>
<p>&nbsp;<br />
<strong>Convert MPEG or AVI to animated GIF:</strong></p>
<pre>ffmpeg -i inputFile.avi outputFile.gif</pre>
<p><strong>Convert MP3 to WAV:</strong></p>
<pre>ffmpeg -i inputFile.mp3 outputFile.wav</pre>
<p><strong>Convert WAV to MP3:</strong></p>
<pre>ffmpeg -i inputFile.wav -ab 256k outputFile.mp3</pre>
<dl>
<dd>Audio bit-rate: 256kbps</dd>
</dl>
<p>&nbsp;<br />
<strong>Remove the audio from MPEG or AVI:</strong></p>
<pre>ffmpeg -i inputFile.avi -an outputFile.avi</pre>
<p><strong>Remove video from MPEG or AVI, and convert to MP3:</strong></p>
<pre>ffmpeg -i inputFile.avi -an -ab 256k outputFile.mp3</pre>
<dl>
<dd>Audio bit-rate: 256kbps</dd>
</dl>
<p>&nbsp;<br />
<strong>Add audio and video together, and convert to MPEG:</strong></p>
<pre>ffmpeg -i audioFile.wav -i videoFile.avi outputFile.mpg</pre>
]]></content:encoded>
			<wfw:commentRss>http://linuxnut.org/2009/01/ffmpeg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>watch</title>
		<link>http://linuxnut.org/2009/01/watch/</link>
		<comments>http://linuxnut.org/2009/01/watch/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 14:56:41 +0000</pubDate>
		<dc:creator>Bryce</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[watch]]></category>

		<guid isPermaLink="false">http://admin.linuxnut.org/?p=25</guid>
		<description><![CDATA[I only came across this command fairly recently. It&#8217;s a simple command, but immensely useful.
The watch command is used to run a given command at a predefined interval, and to monitor the output in real-time until the watch command is terminated. When run, it initially only displays the first output of the given command, and [...]]]></description>
			<content:encoded><![CDATA[<p>I only came across this command fairly recently. It&#8217;s a simple command, but immensely useful.</p>
<p>The watch command is used to run a given command at a predefined interval, and to monitor the output in real-time until the watch command is terminated. When run, it initially only displays the first output of the given command, and then only updates it if something in the output changes.</p>
<p><span id="more-25"></span>For example to have a constantly up-to-date listing of a directory, just run
<pre>watch ls</pre>
<p> Or similarly to have a list of who is logged onto your system, just run
<pre>watch who</pre>
<p> These two examples are very simple, but they can be made as complex as you like.</p>
<p>A number of options can be used:</p>
<ul>
<li>&#8216;-d&#8217; or &#8216;&#8211;differences&#8217; will briefly highlight what has changed in the output</li>
<li>&#8216;&#8211;cumulative&#8217; will make the differences remain displayed</li>
<li>&#8216;-n <em>seconds</em>&#8216; or &#8216;&#8211;interval=<em>seconds</em>&#8216; will allow the interval between program runs to be set to something other than it default of two seconds</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://linuxnut.org/2009/01/watch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remotely shutdown a Windows PC from Linux</title>
		<link>http://linuxnut.org/2008/08/remotely-shutdown-a-windows-pc-from-linux/</link>
		<comments>http://linuxnut.org/2008/08/remotely-shutdown-a-windows-pc-from-linux/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 10:35:12 +0000</pubDate>
		<dc:creator>Bryce</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Remote]]></category>
		<category><![CDATA[Shutdown]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://admin.linuxnut.org/?p=27</guid>
		<description><![CDATA[A remote Windows PC can easily be shutdown, assuming you have Samba installed on your Linux box, and you have a user account on the Windows PC that has the necessary rights.
Just enter the following command, where &#8216;thehostname&#8217; is the hostname of the remote PC, and &#8216;theusername&#8217; is a valid user account on the remote [...]]]></description>
			<content:encoded><![CDATA[<p>A remote Windows PC can easily be shutdown, assuming you have Samba installed on your Linux box, and you have a user account on the Windows PC that has the necessary rights.</p>
<p><span id="more-27"></span>Just enter the following command, where &#8216;thehostname&#8217; is the hostname of the remote PC, and &#8216;theusername&#8217; is a valid user account on the remote PC:</p>
<pre>net rpc shutdown -S thehostname -U theusername</pre>
<p>If the hostname is not known, or cannot be resolved, then use the following instead, where &#8216;123.123.123.123&#8242; is the IP address of the remote PC:</p>
<pre>net rpc shutdown -I 123.123.123.123 -U theusername</pre>
<p>For more information on the command, just enter the following:</p>
<pre>net help shutdown</pre>
<p>Additionally, the parameters that can be used with Windows&#8217; own shutdown command such as &#8216;-f&#8217; to force or &#8216;-t&#8217; to set a timeout, can also be applied to the net rpc shutdown command as well. For example the following will wait 60 seconds, and then force all running programs to terminate before shutting down:</p>
<pre>net rpc shutdown -S thehostname -U theusername -f -t 60</pre>
]]></content:encoded>
			<wfw:commentRss>http://linuxnut.org/2008/08/remotely-shutdown-a-windows-pc-from-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to mount an ISO file in Linux</title>
		<link>http://linuxnut.org/2008/08/how-to-mount-an-iso-file-in-linux/</link>
		<comments>http://linuxnut.org/2008/08/how-to-mount-an-iso-file-in-linux/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 08:59:50 +0000</pubDate>
		<dc:creator>Bryce</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[ISO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mount]]></category>

		<guid isPermaLink="false">http://admin.linuxnut.org/?p=31</guid>
		<description><![CDATA[Sometimes burning an ISO file to a CD-ROM just to access its contents is overkill, but there is another way.
As root, simply enter the following command, where &#8216;cd1.iso&#8217; is the name of the ISO image file, and &#8216;/mnt/cd&#8217; is an existing directory:
mount -o loop cd1.iso /mnt/cd
]]></description>
			<content:encoded><![CDATA[<p>Sometimes burning an ISO file to a CD-ROM just to access its contents is overkill, but there is another way.</p>
<p><span id="more-31"></span>As root, simply enter the following command, where &#8216;cd1.iso&#8217; is the name of the ISO image file, and &#8216;/mnt/cd&#8217; is an existing directory:</p>
<pre>mount -o loop cd1.iso /mnt/cd</pre>
]]></content:encoded>
			<wfw:commentRss>http://linuxnut.org/2008/08/how-to-mount-an-iso-file-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iperf &#8211; Bandwidth Measurement Tool</title>
		<link>http://linuxnut.org/2008/04/iperf-bandwidth-measurement-tool/</link>
		<comments>http://linuxnut.org/2008/04/iperf-bandwidth-measurement-tool/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 07:35:54 +0000</pubDate>
		<dc:creator>Bryce</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://admin.linuxnut.org/?p=33</guid>
		<description><![CDATA[Need a simple way to test the bandwidth between two hosts that you have access to? If so, then just drop Iperf onto both machines. Launch one instance as the server
iperf -s
 and the other as the client
iperf -c &#60;Server IP&#62;
 then after 10 seconds you&#8217;ll have your result.


------------------------------------------------------------
Client connecting to 192.168.1.11, TCP port 5001
TCP [...]]]></description>
			<content:encoded><![CDATA[<p>Need a simple way to test the bandwidth between two hosts that you have access to? If so, then just drop Iperf onto both machines. Launch one instance as the server
<pre>iperf -s</pre>
<p> and the other as the client
<pre>iperf -c &lt;Server IP&gt;</pre>
<p> then after 10 seconds you&#8217;ll have your result.<br />
<span id="more-33"></span></p>
<pre>
------------------------------------------------------------
Client connecting to 192.168.1.11, TCP port 5001
TCP window size: 8.00 KByte (default)
------------------------------------------------------------
[1912] local 192.168.1.21 port 1107 connected with 192.168.1.11 port 5001
[ ID] Interval       Transfer     Bandwidth
[1912]  0.0-10.0 sec  26.7 MBytes  22.4 Mbits/sec
</pre>
<p>Iperf is readily available as a binary for various operating systems, i.e.: Linux, FreeBSD MacOS, Windows, etc. The source code is also available.</p>
<p>For more information, or to download it, please visit the project&#8217;s homepage at <a href="http://dast.nlanr.net/Projects/Iperf/">http://dast.nlanr.net/Projects/Iperf/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxnut.org/2008/04/iperf-bandwidth-measurement-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fuser</title>
		<link>http://linuxnut.org/2008/03/fuser/</link>
		<comments>http://linuxnut.org/2008/03/fuser/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 16:49:10 +0000</pubDate>
		<dc:creator>Bryce</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[fuser]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://admin.linuxnut.org/?p=11</guid>
		<description><![CDATA[Ever tried to unmount a device in Linux, but can&#8217;t because it is apparently still being used by something? If so, then the &#8216;fuser&#8217; command is what you want. Just type &#8216;fuser -m&#8217; followed by the path that the device is currently mounted to (e.g. &#8216;fuser -m /home&#8217;), and then you&#8217;ll receive a list of [...]]]></description>
			<content:encoded><![CDATA[<p>Ever tried to unmount a device in Linux, but can&#8217;t because it is apparently still being used by something? If so, then the &#8216;fuser&#8217; command is what you want. Just type &#8216;fuser -m&#8217; followed by the path that the device is currently mounted to (e.g. &#8216;fuser -m /home&#8217;), and then you&#8217;ll receive a list of all the processes that are currently using it.</p>
<p>The fuser command can also be used to kill the processes as well, just by adding the &#8216;-k&#8217; option (e.g. &#8216;fuser -km /home&#8217;).</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxnut.org/2008/03/fuser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
