Stickies : Linux - FreeBSD commands

Disk, filesystem
Disk usage
{linux}$ du -sh
{freebsd}$ du -sh
Count subdirectories in current directory:
{linux}$ du –max-depth=1
{freebsd}$ du -d1
Typical approach to find biggest directories/files on disk:
{linux}$ du –max-depth=1 -kx|sort -n
{freebsd}$ du -d1 -kx|sort -n
Find some kinds of files (regex is a mask for full path, no need for begin/end marks)
{linux}$ find . -regextype posix-extended -type f -regex “.*\.(java|class)”
{freebsd}$ find [...]

Tags: , ,

Filed under:Stickies

Stickies Today : How to change IP address on FreeBSD

1) Use ifconfig command as follows:
ifconfig interface inet IP
Example(s):
ifconfig lnc0 inet 202.54.1.22
Note lnc0 is Ethernet interface name can be Obtained using ifconfig -a command.
2) To setup up ip permanently open file /etc/rc.conf ; add/modify network entries:
vi /etc/rc.conf
And setup values as follows:
hostname=”fbsdx.test.com”
ifconfig_lnc0=”inet 192.168.0.6 netmask 255.255.255.0″
Note ifconfig_lnc0 is Ethernet interface name can be Obtained using [...]

Tags: ,

Filed under:Stickies