|
Lines 7-13
Link Here
|
| 7 |
By pressing "Scroll Lock" you can use the arrow keys to scroll backward |
7 |
By pressing "Scroll Lock" you can use the arrow keys to scroll backward |
| 8 |
through the console output. Press "Scroll Lock" again to turn it off. |
8 |
through the console output. Press "Scroll Lock" again to turn it off. |
| 9 |
% |
9 |
% |
| 10 |
Want colour in your directory listings? Use "ls -G". "ls -F" is also useful, |
10 |
Want color in your directory listings? Use "ls -G". "ls -F" is also useful, |
| 11 |
and they can be combined as "ls -FG". |
11 |
and they can be combined as "ls -FG". |
| 12 |
% |
12 |
% |
| 13 |
If you need to ask a question on the FreeBSD-questions mailing list then |
13 |
If you need to ask a question on the FreeBSD-questions mailing list then |
|
Lines 128-139
Link Here
|
| 128 |
learned it, but somewhat user-unfriendly. To use ee (an easier but less |
128 |
learned it, but somewhat user-unfriendly. To use ee (an easier but less |
| 129 |
powerful editor) instead, set the environment variable EDITOR to /usr/bin/ee |
129 |
powerful editor) instead, set the environment variable EDITOR to /usr/bin/ee |
| 130 |
% |
130 |
% |
| 131 |
If you accidently end up inside vi, you can quit it by pressing Escape, colon |
131 |
If you accidentally end up inside vi, you can quit it by pressing Escape, colon |
| 132 |
(:), q (q), bang (!) and pressing return. |
132 |
(:), q (q), bang (!) and pressing return. |
| 133 |
% |
133 |
% |
| 134 |
You can use aliases to decrease the amount of typing you need to do to get |
134 |
You can use aliases to decrease the amount of typing you need to do to get |
| 135 |
commands you commonly use. Examples of fairly popular aliases include (in |
135 |
commands you commonly use. Examples of fairly popular aliases include (in |
| 136 |
bourne shell style, as in /bin/sh, bash, ksh, and zsh): |
136 |
Bourne shell style, as in /bin/sh, bash, ksh, and zsh): |
| 137 |
|
137 |
|
| 138 |
alias lf="ls -FA" |
138 |
alias lf="ls -FA" |
| 139 |
alias ll="ls -lA" |
139 |
alias ll="ls -lA" |
|
Lines 148-155
Link Here
|
| 148 |
To remove an alias, you can usually use 'unalias aliasname'. To list all |
148 |
To remove an alias, you can usually use 'unalias aliasname'. To list all |
| 149 |
aliases, you can usually type just 'alias'. |
149 |
aliases, you can usually type just 'alias'. |
| 150 |
% |
150 |
% |
| 151 |
In order to support national characters for european languages in tools like |
151 |
In order to support national characters for European languages in tools like |
| 152 |
less without creating other nationalisation aspects, set the environment |
152 |
less without creating other nationalization aspects, set the environment |
| 153 |
variable LC_ALL to 'en_US.ISO8859-1'. |
153 |
variable LC_ALL to 'en_US.ISO8859-1'. |
| 154 |
% |
154 |
% |
| 155 |
You can search for documentation on a keyword by typing |
155 |
You can search for documentation on a keyword by typing |
|
Lines 460-466
Link Here
|
| 460 |
You can open up a new split-screen window in (n)vi with :N or :E and then |
460 |
You can open up a new split-screen window in (n)vi with :N or :E and then |
| 461 |
use ^w to switch between the two. |
461 |
use ^w to switch between the two. |
| 462 |
% |
462 |
% |
| 463 |
sh (the default bourne shell in FreeBSD) supports command-line editing. Just |
463 |
sh (the default Bourne shell in FreeBSD) supports command-line editing. Just |
| 464 |
``set -o emacs'' or ``set -o vi'' to enable it. |
464 |
``set -o emacs'' or ``set -o vi'' to enable it. |
| 465 |
% |
465 |
% |
| 466 |
When you've made modifications to a file in vi(1) and then find that |
466 |
When you've made modifications to a file in vi(1) and then find that |
|
Lines 469-471
Link Here
|
| 469 |
|
469 |
|
| 470 |
This won't work if you don't have write permissions to the directory |
470 |
This won't work if you don't have write permissions to the directory |
| 471 |
and probably won't be suitable if you're editing through a symbolic link. |
471 |
and probably won't be suitable if you're editing through a symbolic link. |
|
|
472 |
% |
| 473 |
The portupgrade package contains several useful programs that help |
| 474 |
with upgrading, installing, and comparing versions of software that |
| 475 |
has been installed via ports. |
| 476 |
|
| 477 |
# cd /usr/ports/sysutils/portupgrade/ |
| 478 |
# make install && make clean |
| 479 |
% |
| 480 |
If you are updating your ports tree and have the portupgrade(1) |
| 481 |
utilities installed, run the following command to see what ports can |
| 482 |
be upgraded: |
| 483 |
|
| 484 |
# portversion -v -L= |
| 485 |
% |
| 486 |
The portupgrade(1) utility (ports/sysutils/portupgrade) provides a |
| 487 |
safe and easy way for upgrading ports. |
| 488 |
|
| 489 |
# portupgrade [portname] |
| 490 |
% |
| 491 |
The portsdb(1) command that comes with the portupgrade(1) suite of |
| 492 |
utilities (ports/sysutils/portupgrade) can be used to remake the ports |
| 493 |
master INDEX file. Try adding the following line to your |
| 494 |
/etc/weekly.local file so that periodic(8) will rebuild the ports |
| 495 |
INDEX: |
| 496 |
|
| 497 |
/usr/bin/nice -20 /usr/local/sbin/portsdb -U -u |
| 498 |
% |
| 499 |
The pkgdb(1) command that comes with the portupgrade(1) suite of |
| 500 |
utilities (ports/sysutils/portupgrade) can be used to correct broken |
| 501 |
dependencies that can sometimes occur when upgrading ports with |
| 502 |
dependencies. After upgrading several ports, it is probably a good |
| 503 |
idea to run the following command to fix port dependencies. |
| 504 |
|
| 505 |
# pkgdb -F |
| 506 |
% |
| 507 |
Try combining portversion(1) with tee(1) and a periodic(8) job that |
| 508 |
follows after you update your ports tree. Use tee(1) that way you get |
| 509 |
a list of ports that can be upgraded in your nightly email along with |
| 510 |
an updated copy on the file system. portversion(1) is apart of the |
| 511 |
portupgrade port (ports/sysutils/portupgrade). Ex: place the |
| 512 |
following after cvsup commands in /etc/weekly.local: |
| 513 |
|
| 514 |
/usr/local/sbin/portversion -O -v -L= | /usr/bin/tee /etc/upgradable_ports |