Playing with Debian

Wednesday, 13th February 2008 at 08:43pm

Debian cheat sheet

Following on from my last post about basic unix commands, I found this PDF that's really helpful too.

man – is another useful one. It gives you the manual entry for a function. For instance "man ls" would give you the manual page for that command, as well as all its options and parameters. man can output a lot sometimes, and it's too much if you're just quickly checking what a function is for, in cases like that you can use "man -k ls". That will make "ls" part of a regular expression though, so all the commands with "ls" in it will get thrown up too. To stop that, use "man -k ^ls$".

If you're looking at a manual page there are two buttons you need to be aware of: press "q" to quit from the manual, and space bar to go down to the next page.

Redwood don't give me any information on how much hard drive space I have left. If you want to find that out, you can use the command "df", which will output some stuff about your hard drive.

Comments

Your name: Your URL:

Body:

User comments

Andrew McKay says:

Does this thing take HTML tags? I guess we'll see :)

df is a useful command. If you haven't already worked it out, adding the -h flag (so df -h) makes it output its stuff in human-readable format - i.e. a partition size of 8.0G instead of 8355781.

du is also a useful command - although probably not for a while yet - which shows you how much disk space is being used by each directory in a directory tree. Doing it in / would be useless but you can use it to track down where all your space has gone if you're running out. Again, the -h flag makes its output 'human readable'.

Read some previous entries