7 Other Useful Commands

df

shows file space and mounted systems.

ps aux

shows processes running. ps ax is a narrower form.

rm filename

remove filename.

rm -R dir

removes a directory dir and all subdirectories--careful!

ls -R

lists files in the current directory and all subdirectories; I used a variant, ls -AFR > where.txt, to get a list of all the files in / and (separately) /usr before I found better ways to find files.

passwd

to change user's password (or root's password)

man hier

manual page on the UNIX® filesystem

Use find to locate filename in /usr or any of its subdirectories with

% find /usr -name "filename"

You can use * as a wildcard in "filename" (which should be in quotes). If you tell find to search in / instead of /usr it will look for the file(s) on all mounted filesystems, including the CDROM and the DOS partition.

An excellent book that explains UNIX commands and utilities is Abrahams & Larson, Unix for the Impatient (2nd ed., Addison-Wesley, 1996). There is also a lot of UNIX information on the Internet.

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:58:40