Next
Previous
Contents
Miscellaneous stuff
This section contains a small collection of programs that you might find
useful. Please browse our Linux
site for more information on Linux commands.
Disk usage
To know how much space is left in the part of the hard disk (partition)
where you home directory is do
df $HOME
To find out how much disk space your home directory is using do
du -s $HOME
If you want to find the usage of a particular directory do
du -s directory-name
You need to have permission to list all files and directories inside
that directory; otherwise the result of du will not be accurate.
If you want to save disk space you can compress those file you do not
use/look at regularly; see the compression HOTWO document.
Job control
To know what programs are running in the machine under your name do
ps x
You need to give x option or programs in the background will not
show. If you want to stop a particular program, do
kill number-of-program
where number-of-program is the number that appears in the first
column after you do ps. If the program does not stop (you can
check with ps after the kill command) then try
kill -9 number-of-program
To see interactively all programs running in a machine use the
top command.
Some times one of your programs will run for a long time and you do not
mind if it does it slowly (say you are nice to the other users!). After
starting the program you can find its number with ps and then
make it run slowly with
nice 10 number-of-program
Files
Here are some programs to handle your files:
- chmod:
to change permissions of a file
- chown:
to change ownership of a file
- cmp:
to compare two files
- cp:
to copy one file into another
- diff:
shows the differences between two files (cmp above only says where the
first difference between two files is)
- tkdiff:
a nice X-windows coloured version of diff
- find:
to find a file in a directory (useful when you have too many files or
subdirectories)
- head:
shows the beginning (head) of a file
- ispell:
a spell checker
- less:
to see the contents of a file
- ls:
to list the files in a directory or information about a particular file
- more:
to see the contents of a file, like less, but a little less powerful
- mv:
to rename a file
- rm:
to delete a file
- sort:
sorts the contents of a file
- tail:
shows the end (tail) of a file
System information
- date:
shows (and if you are superuser, sets) the date of the computer
- free:
shows the amount of free and used memory of a computer
- w:
displays information about the users currently on the machine, and their
processes
Other commands
- at:
allows you to run commands at a later date
- bc:
a text-based powerful calculator that accepts input and gives output in
different bases, has square root, good precision, etc
- cron:
to run commands periodically (at is used mostly to run a command once;
cron is for something that you want to run periodically, for example
every Monday, or every other day at 5 PM).
Next
Previous
Contents