| Tip: 16 Comments: 0
|
Nice tcsh prompt: set prompt = '%n@%m:%/%# '
|
| Tip: 17 Comments: 0
|
Nice tcsh prompt: set prompt = '[%B%m%b] %B%~%b%# '
|
| Tip: 18 Comments: 0
|
Simple tcsh prompt: set prompt = '%# '
|
| Tip: 19 Comments: 0
|
If you want df(1) and other commands to display disk sizes in
kilobytes instead of 512-byte blocks, set BLOCKSIZE in your
environment to 'K'. You can also use 'M' for Megabytes or 'G' for
Gigabytes. If you want df(1) to automatically select the best size
then use 'df -h'.
|
| Tip: 20 Comments: 0
|
To change an environment variable in tcsh you use: setenv NAME "value"
where NAME is the name of the variable and "value" its new value.
|
| Tip: 21 Comments: 0
|
To change an environment variable in /bin/sh use:
$ VARIABLE="value"
$ export VARIABLE
|
| Tip: 22 Comments: 0
|
You can use /etc/make.conf to control the options used to compile software
on this system. Example entries are in
/usr/share/examples/etc/defaults/make.conf.
|
| Tip: 23 Comments: 0
|
To do a fast search for a file, try
locate filename
locate uses a database that is updated every Saturday (assuming your computer
is running FreeBSD at the time) to quickly find files based on name only.
|
| Tip: 24 Comments: 0
|
In order to search for a string in some files, use 'grep' like this:
grep "string" filename1 [filename2 filename3 ...]
This will print out the lines in the files that contain the string. grep can
also do a lot more advanced searches - type 'man grep' for details.
|
| Tip: 25 Comments: 0
|
You can use the 'fetch' command to retrieve files over ftp or http.
fetch http://www.freebsd.org/index.html
will download the front page of the FreeBSD web site.
|
| Tip: 26 Comments: 0
|
In order to make fetch (the FreeBSD downloading tool) ask for
username/password when it encounter a password-protected web page, you can set
the environment variable HTTP_AUTH to 'basic:*'.
|
| Tip: 27 Comments: 0
|
You can permanently set environment variables for your shell by putting them
in a startup file for the shell. The name of the startup file varies
depending on the shell - csh and tcsh uses .login, bash, sh, ksh and zsh use
.profile. When using bash, sh, ksh or zsh, don't forget to export the
variable.
|
| Tip: 28 Comments: 0
|
If you are running xterm, the default TERM variable will be 'xterm'. If you
set this environment variable to 'xterm-color' instead, a lot of programs will
use colors. You can do this by
TERM=xterm-color; export TERM
in Bourne-derived shells, and
setenv TERM xterm-color
in csh-derived shells.
|
| Tip: 29 Comments: 0
|
If you do not want to get beeps in X11 (X Windows), you can turn them off with
xset b off
|
| Tip: 30 Comments: 0
|
You can look through a file in a nice text-based interface by typing
less filename
|