=========================================================================== Linux-User Tips 004 March 15th, 2000. =========================================================================== What's covered in this doc: 1. Locating logs and tracking them. 2. Finding out how to fix a problem, with man pages (console and kde) 3. Using Info (console and kde) 4. Alphabetical listing of more commands 5. KDE keyboard commands Now and again you may run into problems, and need to find the logs to show you what happened on your system. ==================================================== 1. Where to find logs and info ==================================================== file purpose ================================= /var/log/messages system wide errors /var/log/xdm-error X server errors are sometimes documented in /var/log/xdm-error or in files in your home directory in .Xerrors or .Xsession-errors. If you've got apache httpd server running, then you may also see these: /var/log/httpd/access_log log of users who've visited /var/log/httpd/error_log errors reported by the web server. To create entries tracking these logs, you can type 'tail -f /var/log/messages' in an xterm window or another console. Basically, you can create error logs of programs you run with this: '[command] 2> error.log' This will write error messages of command being run to a file called error.log. You can do the same with X: In an xterm, type the command in a virtual console window. ================================================= 2. To find out how to fix a problem: ================================================= To find out what's wrong or how to fix a problem, you can use the system's documentation, called man pages. You can read them by typing man [command]. You can read the GNU help documentation by typing info [command] What are man pages? These are the standard help files and are provided with most Linux distributions. Note that KDE apps and GNU software usually come with their own documentation, though. helpme (in a console) and helptool (in X) These commands search the contents of given directories for a specified string and display the contents. Type helpme --help to see the arguments this command expects in a console. man [command] Shows you the man page of that command. man -f [command] Shows you a one-line description of the commands purpose. man -k [string] Searches for a given string in the synopsis lines of all man pages. ex: man -k X will give you a long list of all man pages related to X windows) man -K [string] Searches the whole body of _every_ manpage for the string. Could be a _bit_ lengthy :) Movement on man pages: The man pages use the same keys as less (n, p, PgUp, PgDn etc.) /[string] Search forward for a string. n Next match ?[string] Next match backwards. b Move back one screen. h help on man keys/commands q Exit man page X programs to handle man pages: KDE help ('man [command]') ===================================================== 3. Using Info (console and kde) ===================================================== info files are usually provided by programs written by GNU (like gcc, Emacs, many system utilities). They provide a hypertext-type help system. info [command] Displays info page of that command. n for (next) occurance, p (previous), u (up), (follows link). The top line of every info file will show you where these commands will take you. or in an Xterm: info [command] ========================================================= 4. Alphabetical listing of more commands: ========================================================= And there are still tons more, but these are I think appropriate for the discussion above. Read about these commands with man [command], please. I'll try to provide examples in the next issue. A alias Change the name of a command. at Runs a program at a certain time atq Lists programs waiting to be run by at atrm Removes programs from the at queue C cat Concatenate files and print on standard output cd Change to a directory chfn Changes information displayed by finger chmod Change access permissions of files chown Change the user and group ownership of files chsh Change your shell control-panel System administration tool cp Copy files D dd Copy disk images df Available free disk space dir List directory contents dmesg List startup messages du Disk space used dump Used to backup filesystems E e2fsck File system checker export Set environment variables in bash F find Find files fdformat Low level format a floppy disk fdisk Used to create and delete partitions finger Look up user information free Display amount of free and used memory in the system G grep Find lines matching a certain pattern groupadd Add a new group groupdel Delete a group groups Displays a user's groups gzip Compress and decompress files H halt Shut down system host Look up host information hostname Show or set the system's host name I ifconfig Setup network interfaces, or report the current status init Change run level insmod Install modules K kill Abort system processes L less Filter for viewing files and directories ln Create links between files or directories locate Locate files that match a certain pattern login Sign on to system or switch users logout Sign off of current user lpc Manage printer queue lpq View the printer queue lpr Print files ls List directory contents lsmod View loaded modules M make Compile and maintain programs makewhatis Build make database man View manual pages mcd Change to a directory on a DOS diskette mcopy Copy files to a DOS diskette mdel Delete files on a DOS diskette mdeltree Delete directories on a DOS diskette mdir List directory contents on a DOS diskette mformat Format DOS diskettes mkbootdisk Makes a boot disk :-) mkdir Make a new directory mkswap Setup swap device modprobe Install modules more Filter for viewing files and directories mount Access or mount filesystems mv Move or rename a file N netcfg Network configuration tool netstat Displays status of network connectios nslookup Name server lookup tool P passwd Change a user password ping send packets to network hosts to test host ps Display process status pstree Displays entire process tree pwd Display working directory path R reboot Reboots system reset Restore run-time parameters for session to default restore Used to restore a dump backup rm Remove files rmdir Remove directory rmmod Remove loaded modules rpm Manage rpm packages S set Temporarily change enviroment settings shutdown Shutdown system startx Start X Window System su Switch to a different user su - 'user' Switch to this user with his full permissions/user dir sync Flush buffered data to hard disk sysinfo Display system information T tar Manage archives top Display top cpu processes touch Used to create a file or change time stamp traceroute Show route of IP packets U umount Unmount filesystems uname Display information about your system unzip Extract compressed files updatedb Build locate database uptime Show how long computer has been running useradd Add new user accounts userdel Delete user accounts usermod Modify user accounts W whereis Find binary, source, and manual pages for a command which Show full path of command who Show the users who are logged in whoami Show the user who you are currently logged in as X xlock Lock X Window System ================================================== 4. KDE Keyboard commands: ================================================== This list of keys may help you get around on the desktop if you're running KDE. ctl+tab Switch between desktops alt+tab Switch between applications alt+f1 Open application menu alt+f2 Opens command window alt+f3 Opens window menu alt+f4 Closes window f1 Opens help for program f2 Finds a word in a page f3 Finds next space Selects/Unselect files ctl+n Open file manager window ctl+a Selects all files in current directory ctl+t Opens a terminal window ctl+w Closes window ctl+f Finds files ctl+c Copy ctl+v Paste By Janis Kracht 3/15/00 Co-Moderator, Linux-user message echo. Comments/suggestions/corrections to janis@filegate.net.