<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://freebsdwiki.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://freebsdwiki.net/index.php?action=history&amp;feed=atom&amp;title=Personal_Scripts</id>
		<title>Personal Scripts - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://freebsdwiki.net/index.php?action=history&amp;feed=atom&amp;title=Personal_Scripts"/>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php?title=Personal_Scripts&amp;action=history"/>
		<updated>2026-05-20T17:09:09Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.18.0</generator>

	<entry>
		<id>http://freebsdwiki.net/index.php?title=Personal_Scripts&amp;diff=13195&amp;oldid=prev</id>
		<title>173.88.199.104: Created page with &quot;  == Personal Scripts ==  FBSD is a command line driven operating system. It's very hard to remember where all the config files are and what they are called. You have to be co...&quot;</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php?title=Personal_Scripts&amp;diff=13195&amp;oldid=prev"/>
				<updated>2012-08-14T00:39:19Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;  == Personal Scripts ==  FBSD is a command line driven operating system. It&amp;#039;s very hard to remember where all the config files are and what they are called. You have to be co...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Personal Scripts ==&lt;br /&gt;
&lt;br /&gt;
FBSD is a command line driven operating system. It's very hard to remember where all the config files are and what they are called. You have to be constantly working on your FBSD systems on a daily basis to remember all the commands you use to do repetitive things. I found that if I build a simple shell script and place the command I use, or the sequence of commands I used to perform repetitive tasks, I can give the script a long name that self describes what it does. All users have a bin directory which they can save their canned scripts in. The users bin directory is not created as part of the FBSD install so you must make one for root.&lt;br /&gt;
&lt;br /&gt;
cd /root&lt;br /&gt;
&lt;br /&gt;
mkdir bin&lt;br /&gt;
&lt;br /&gt;
Now lets say for example I use IPFILTER for my firewall. I repeatedly edit the filter rules, load the rules, edit the NAT rules, and load the NAT rules. I simplify these admin functions by creating simple scripts with meaningful names.&lt;br /&gt;
&lt;br /&gt;
ipf.edit.rules&lt;br /&gt;
ipf.load.rules&lt;br /&gt;
ipf.edit.natrules&lt;br /&gt;
ipf.load.natrules&lt;br /&gt;
&lt;br /&gt;
Here is how to create simple script.&lt;br /&gt;
&lt;br /&gt;
cd /root/bin&lt;br /&gt;
&lt;br /&gt;
ee ipf.edit.rules&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
ee /etc/ipf.rules&lt;br /&gt;
&lt;br /&gt;
Close and save the file.&lt;br /&gt;
&lt;br /&gt;
ls -l     # will show you that this file only has read and write permission. It needs execute permission to run.&lt;br /&gt;
&lt;br /&gt;
chmod 700 ipf.edit.rules   # give it execute permission for root owner only&lt;br /&gt;
&lt;br /&gt;
rehash    # let the shell know about it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter ipf.edit.rules on the command line, and you find yourself looking at the screen displaying your rules file open and ready to edit.&lt;br /&gt;
&lt;br /&gt;
Every time you want to create another script, copy an existing one and it will already have the correct permissions to execute.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>173.88.199.104</name></author>	</entry>

	</feed>