| Tip: 91 Comments: 0
|
Forget when Easter is? Try "ncal -e". If you need the date for Orthodox
Easter, use "ncal -o" instead.
-- Dru
|
| Tip: 92 Comments: 0
|
Need to see your routing table? Type "netstat -rn". The entry with the G
flag is your gateway.
-- Dru
|
| Tip: 93 Comments: 0
|
Need to see which daemons are listening for connection requests? Use
"sockstat -4l" for IPv4, and "sockstat -l" for IPv4 and IPv6.
-- Dru
|
| Tip: 94 Comments: 0
|
Can't remember if you've installed a certain port or not? Try "pkg_info |
grep port_name".
-- Dru
|
| Tip: 95 Comments: 0
|
To erase a line you've written at the command prompt, use "Ctrl-U".
-- Dru
|
| Tip: 96 Comments: 0
|
To repeat the last command in the C shell, type "!!".
-- Dru
|
| Tip: 97 Comments: 0
|
Need to quickly empty a file? Use ": > filename".
-- Dru
|
| Tip: 98 Comments: 0
|
To see all of the directories on your FreeBSD system, type
ls -R / | more
-- Dru
|
| Tip: 99 Comments: 0
|
To see the IP addresses currently set on your active interfaces, type
"ifconfig -u".
-- Dru
|
| Tip: 100 Comments: 0
|
To see the MAC addresses of the NICs on your system, type
ifconfig -a
-- Dru
|
| Tip: 101 Comments: 0
|
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.
|
| Tip: 102 Comments: 0
|
sh (the default bourne shell in FreeBSD) supports command-line editing. Just
``set -o emacs'' or ``set -o vi'' to enable it.
|
| Tip: 103 Comments: 0
|
When you've made modifications to a file in vi(1) and then find that
you can't write it, type ``!rm -f \%'' then ``:w!'' to force the
write
This won't work if you don't have write permissions to the directory
and probably won't be suitable if you're editing through a symbolic link.
|
| Tip: 104 Comments: 0
|
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'
|