Sometimes a single slow HDD can cripple the performance of your entire system. You can spot one like this:
# gstat -I5s | sort -rn -k9 | head
-- Alan Somers <asomers@FreeBSD.org>
%
Sometimes a single slow HDD can cripple the performance of your entire system. You can spot one like this:
# gstat -I5s | sort -rn -k9 | head
-- Alan Somers <asomers@FreeBSD.org>
%
Want to know how many words, lines, or bytes are contained in a file? Type
"wc filename".
-- Dru <genesis@istar.ca>
Want to know how much memory (in bytes) your machine has installed? Let
sysctl(8) tell you with the following command:
sysctl hw.realmem
The realmem value is memory before the kernel and modules are loaded, whereas
hw.physmem is what is left after they were loaded.
The number of active CPUs is displayed using this command:
sysctl hw.ncpu
-- Benedict Reuschling <bcr@FreeBSD.org>
You can look through a file in a nice text-based interface by typing
less filename
Handy bash(1) prompt: PS1="\u@\h \w \!$ "
-- David Scheidt <dscheidt@tumbolia.com>
To see the 10 largest files in a directory or on a UFS partition, use
du -h /partition_or_directory_name | sort -rh | head
-- Dru <genesis@istar.ca>
Need to see the calendar for this month? Simply type "cal". To see the
whole year, type "cal -y".
-- Dru <genesis@istar.ca>
If you do not want to get beeps in X11 (X Windows), you can turn them off with
xset b off
This fortune brought to you by:
$FreeBSD$
If you have a CD-ROM drive in your machine, you can make the CD-ROM that is
presently inserted available by typing 'mount /cdrom' as root. The CD-ROM
will be available under /cdrom/. Remember to do 'umount /cdrom' before
removing the CD-ROM (it will usually not be possible to remove the CD-ROM
without doing this.)
Note: This tip may not work in all configurations.
If you accidentally end up inside vi, you can quit it by pressing Escape, colon
(:), q (q), bang (!) and pressing return.
Are you looking for a package? Search for it with
"pkg search part_of_package_name"
-- Lars Engels <lme@FreeBSD.org>
FreeBSD's top(1) utility displays CPU statistics by default.
To display I/O activity for each process instead, run top like this:
top -m io
-- Benedict Reuschling <bcr@FreeBSD.org>
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