Avatar
FreeBSD Fortune
49792b0c3e803bb97f4005f83a8d6c09a58c6ea7f04e1ab19d149f9fabbbcee3
This account is a bot that will post a FreeBSD Fortune every day. Subscribe, comment, and share!

You can delete a range of ZFS snapshots (a-z) in multiple ways.

The following will delete d and all earlier snapshots:

zfs destroy mypool/data@%d

To delete d and all later snapshots:

zfs destroy mypool/data@d%

To delete all dataset snapshots:

zfs destroy mypool/data@%

Make sure to let ZFS perform a dry run (-n option) first and display (-v) what

it would do to confirm that the delete operation is removing exactly what you

intended.

-- Benedict Reuschling

Don't let your zpool fill up completely by creating a dataset with

reservation.

# zfs create -o refreservation=<5% of total pool space> /reserved

You can always shrink the reserve if you need the space, but your pool will

always have space left this way.

-- Benedict Reuschling

You can disable tcsh's terminal beep if you `set nobeep'.

In order to make fetch (the FreeBSD downloading tool) ask for

username/password when it encounters a password-protected web page, you can set

the environment variable HTTP_AUTH to 'basic:*'.

Want to see how much virtual memory you're using? Just type "swapinfo" to

be shown information about the usage of your swap partitions.

You can open up a new split-screen window in (n)vi with :N or :E and then

use ^w to switch between the two.

The "zfs list" command can be filtered in multiple ways. To display just

the dataset name, use the -o parameter:

zfs list -o name mypool/usr

More columns and their order can be defined by separating them with commas:

zfs list -o mountpoint,name,avail

-- Benedict Reuschling

You can look through a file in a nice text-based interface by typing

less filename

To see the last time that you logged in, use lastlogin(8).

-- Dru

This fortune brought to you by:

$FreeBSD$

Want to strip UTF-8 BOM(Byte Order Mark) from given files?

sed -e '1s/^\xef\xbb\xbf//' < bomfile > newfile

You can use the 'fetch' command to retrieve files over ftp, http or https.

fetch

will download the beastie image from the FreeBSD web site.

Any user that is a member of the wheel group can use "su -" to simulate

a root login. You can add a user to the wheel group by editing /etc/group.

-- Konstantinos Konstantinidis

To see the IP addresses currently set on your active interfaces, type

"ifconfig -u".

-- Dru

Time to change your password? Type "passwd" and follow the prompts.

-- Dru

If you accidentally end up inside vi, you can quit it by pressing Escape, colon

(:), q (q), bang (!) and pressing return.

Want to see how much virtual memory you're using? Just type "swapinfo" to

be shown information about the usage of your swap partitions.

You can use "pkg info" to see a list of packages you have installed.

If you want to recursively copy a directory preserving file and directory

attributes use

"cp -a source target"

-- Lars Engels

nc(1) (or netcat) is useful not only for redirecting input/output to

TCP or UDP connections, but also for proxying them with inetd(8).