*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  FreeBSD Tips              
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
<<  [Prev]  1  2  3  4  5  6  7  8  9  10  11  [Next]  >>
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service