[Main Index] [Next entry: "Work related stuff..."]
10/02/2002 Entry: "My *NIX Journal"
I find that I am prone to forgetting many of the little things I discover about UNIX/Linux etc. The advantage of the *nix world is that, unlike GUIs, you can actually easily record these tricks, so let's take advantage of that :)
This is primarily for my own use. If you find something useful or incorrect, feel free to add to it (by posting a comment).
Replies: 10 comments
Secure file copying
scp srcFile user@remote_srvr:/path/destFile
-r switch can be used to copy directories recursively.
Posted by Fahd @ 12/17/2002 07:09 PM EST
Processes & Memory
I need to do a lot of work on this, but free, top, and ps are three utilities that prove useful in looking at memory usage. I was trying to figure out why mozilla 1.1 spawned 5 processes, each using 20+MB of RAM, but couldn't get to the root of that problem.
The auxw switch on ps seems to give memory usage, but I am still looking for a legend to the ps output columns.
Posted by Fahd @ 11/13/2002 06:23 PM EST
Linux Anonymous and Secure
One of my fav. journalists, Thomas Greene of TheRegister, wrote this:
http://www.theregister.co.uk/content/55/27998.html
Posted by Fahd @ 11/08/2002 04:33 AM EST
Compressing using tar
tar has multiple uses. I may be wrong, but tar itself is just a packaging utility. It does not compress things by itself. However, it can filter the contents of its package through compress, gzip, bzip2, etc.
Usage: tar --remove-files -zcf archive.tgz Files/
--remove-files is handy when you are running out of space, and want to delete files that are added to the archive so you don't have to give up space to duplication.
-z compresses the contents via gzip.
-c creates a new archive, instead of adding to one.
-f forces output to a file.
Posted by Fahd @ 11/08/2002 12:49 AM EST
Posted by Fahd @ 10/25/2002 12:27 PM EST
Type:
PATH=$PATH:directory_to_add
export PATH
You may want to open an xterm window separately to avoid destroying your ability to even do an ls :) If all else fails, do an env on the xterm window and copy the declare -x line with the path and paste it into your original window.
Posted by Fahd @ 10/09/2002 03:52 PM EST
If you can't use the menu to set fonts in XTerm, then you need to edit your ~/.Xdefaults file. Add a simple
XTerm*font: 8x14
to change font size. Or, use the handy xfontsel X app to pick the font style you want, choose it, and paste it in, like this:
XTerm*font: -*-lucidatypewriter-*-*-*-*-*-*-*-*-*-*-*-*
The different portions of this string set things like the font size, resolution, italics, etc. xfontsel lets you play with the settings and generates the appropriate coding for you.
I am still trying to figure out how to set background colors etc. via a non-menu procedure, but at least this will give you white text on black:
XTerm*reverseVideo:on
Posted by Fahd @ 10/07/2002 12:18 PM EST
Odd. lpr doesn't seem to have a man entry on my DEC UNIX machine. Hmph.
Handy options with lpr:
-h If your shared printer prints a burst or title page, you can suppress it using this option.
-#? Replace the ? by a number to denote how many copies you want to print.
Posted by Fahd @ 10/04/2002 03:18 PM EST
To see what users are logged in and what they are doing, the diminutive w command is handy. Try w -s for abbreviated output.
The finger command, with no params, will do something similar.
Posted by Fahd @ 10/04/2002 03:16 PM EST
Usage: df [-h]
du: disk usage. This differs from df in that it gives you the amount of space a file/files use, not the free space on the disk.
Usage: du [-hs] [files or directory]
-s prints only the summary usage and not a figure for each file, which is what we want most of the times. If no file/directory is specified, the current directory will be used instead.
Posted by Fahd @ 10/04/2002 03:12 PM EST
Page Views since April 2001: