GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  EDITFILE (1)

NAME

editfile - Commandline program for editing simple files

CONTENTS

Synopsis
Description
Options
Examples
See Also
Info

SYNOPSIS

editfile [-s separator] [-c list] [-dorq] file string

DESCRIPTION

editfile can be used to add, remove, comment out or change lines in simple files like rc.conf and sshd_config. If string starts with a comment starter and the keyword is found in the file, it will be commented out.

OPTIONS

-c list list is a comma separated list of comment starters to use. The default is ’#’.
-d Disable autodetection of the ’=’ seperator.
-o Overwrite only. The default is to add keywords (and values) not found.
-r Remove the line from the file.
-s separator
  Specify a one char separator to use. The default is whitespace.
-q Make editfile output to syslog and only output errors.

EXAMPLES

Set sendmail_enable="NONE" if found. If not found add it to the file:
  editfile /etc/rc.conf sendmail_enable=\"NONE\"
Comment out sendmail_enable if found:
  editfile /etc/rc.conf #sendmail_enable
Change the Port value to 22 if found.
  editfile /etc/ssh/sshd_config Port 22 -o
Remove the Port line if found:
  editfile /etc/ssh/sshd_config Port -r

SEE ALSO

editfstab(1), editkernel(1), editlogin(1), editttys(1)
 

INFO

Author/Maintainer:
  Daniel Blankensteiner <db@TruNet.dk>
License:
  BSD
Website:
  lockdown.TruNet.dk or the mirror lockdown.loproc.dk
Search for    or go to Top of page |  Section 1 |  Main Index


EDITFILE (1) -->

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.