RSS

Posts Tagged ‘FreeBSD’

VirtualBox Headless VM

Wednesday, April 6th, 2011

VBoxManage for controlling VirtualBox on the Command Line

The main tool for controlling VirtualBox is called VBoxManage. The VirtualBox manual has 27 pages describing all the available paramaters for using VirtualBox. The VirtualBox manual is a great resource to accompany this tutorial. [...]

FreeBSD quote of the day #4

Monday, April 4th, 2011

You can use aliases to decrease the amount of typing you need to do to get
commands you commonly use. Examples of fairly popular aliases include (in
Bourne shell style, as in /bin/sh, bash, ksh, and zsh):

alias lf=”ls -FA”
alias ll=”ls -lA”
alias su=”su -m”

In csh or tcsh, these would be

alias lf ls -FA
alias ll ls -lA
alias su su -m

To remove an alias, you can usually use ‘unalias aliasname’. To list all
aliases, you can usually type just ‘alias’.

FreeBSD quote of the day #30

Wednesday, March 30th, 2011

Want to know how many words, lines, or bytes are contained in a file? Type
wc filename“.

FreeBSD quote of the day #22

Tuesday, March 22nd, 2011

To see how long it takes a command to run, type the word “time” before the
command name.

FreeBSD quote of the day #15

Tuesday, February 15th, 2011

Want to use sed(1) to edit a file in place? Well, to replace every ‘e’ with an ‘o’, in a file named ‘foo’, you can do:

sed -i.bak s/e/o/g foo

And you’ll get a backup of the original in a file named ‘foo.bak’, but if you want no backup:

sed -i '' s/e/o/g foo

FreeBSD quote of the day #13

Sunday, February 13th, 2011

If you want to quickly check for duplicate package/port installations,
try the following pkg_info command.

pkg_info | sort | sed -e 's/-[0-9].*$//' | \
uniq -c | grep -v '^[[:space:]]*1'

FreeBSD quote of the day #11

Friday, February 11th, 2011

You can ‘set autologout = 30‘ to have tcsh log you off automatically
if you leave the shell idle for more than 30 minutes.

FreeBSD quote of the day #5

Saturday, February 5th, 2011

To read a compressed file without having to first uncompress it, use
"zcat" or "zmore" to view it.

FreeBSD quote of the day #2

Wednesday, February 2nd, 2011

The default editor in FreeBSD is vi, which is efficient to use when you have
learned it, but somewhat user-unfriendly. To use ee (an easier but less
powerful editor) instead, set the environment variable EDITOR to /usr/bin/ee

FreeBSD quote of the day #1

Tuesday, February 1st, 2011

Need to see the calendar for this month? Simply type “cal“. To see the
whole year, type “cal -y“.