Difference between revisions of "FreeBSD"

From Secure Computing Wiki
Jump to: navigation, search
(Commands)
Line 46: Line 46:
 
== Jails and Postgres ==
 
== Jails and Postgres ==
 
[http://www.freebsddiary.org/jail-multiple.php Read Me!]
 
[http://www.freebsddiary.org/jail-multiple.php Read Me!]
 +
 +
== Errors ==
 +
{| class="wikitable"
 +
|-
 +
! Error
 +
! Fix
 +
|-
 +
| Lookup of /dev for devfs, error: 2
 +
| The /dev directory was deleted/can't be found on the root filesystem.  Recreate, reboot.
 +
|-
 +
|}
 +
  
 
[[Category: FreeBSD]]
 
[[Category: FreeBSD]]

Revision as of 20:19, 17 January 2009

Commands

This is a table of useful commands gleaned out of mailing lists and personal experience.

Command Description Command
Find the date of the newest file in a directory. find /some/dir -type f -printf "%T@^%h/%f\n" | awk -F^ '{ if ($1 > the_max) { the_max = $1; file_name = $2; } } END { print file_name }'
ls -ltr /some/dir | tail -1 | awk '{print $6" "$7" "$8}'
md5 all files in <foo> directory and find matches md5 -r ./<foo> | sort | uniq -c
Remove IP from interface.
This works for the primary IP on an interface, too.
ifconfig <interface> <IP> -alias

Management

To enable passive mode for fetch when using pkg_add, sent the environment variable FTP_PASSIVE_MODE to something. If you use csh/tcsh, the following command will work:

# setenv FTP_PASSIVE_MODE 1

Networking

Virtualization

Ports/Applications

  • You can look up what options were passed to configure at /var/db/ports/{prtname}/options.

Jails and Postgres

Read Me!

Errors

Error Fix
Lookup of /dev for devfs, error: 2 The /dev directory was deleted/can't be found on the root filesystem. Recreate, reboot.