This document provides a list of Unix commands and their functions. It includes many common commands like ls, grep, find, as well as some DB2-specific commands. The document is in German and contains tables of commands organized by their file or directory path.
This document provides a list of Unix commands and their functions. It includes many common commands like ls, grep, find, as well as some DB2-specific commands. The document is in German and contains tables of commands organized by their file or directory path.
Path / File / Command Funktion .login Settings fr Korn Shell User .profile Profile Script fr Korn Shell User .Xauthority X-Window Scecurity Mechanism .Xdefault X-Window GUI Einstellungen .Xsession X-Window Einstellungen (wie .profile) /etc /init.d/... /rc.d/[rc{runlvl}|init].d/ Solaris: Run Control Scripts, system-level independent AIX: Run Control Scripts, system-level independent /etc/[profile|.login] Solaris+AIX: Initial Machine wide BSH/KSH Defaults /etc/csh.cshrc 1 st System-wide Setup File C Shell /etc/csh.login 2 nd System-wide Setup File C Shell (wenn verfgbar) /etc/default/... Solaris: Default-Umgebungseinstellungen /etc/default/init Solaris: Timezones, Locales, Language, Codepage /etc/default/login Solaris: Shell Defaults /etc/environment AIX: Shell Defaults (ulimit, umask, path etc.) /etc/group User Group Verzeichnis /etc/inet/... Solaris: Inet Daemon Config (hosts,ipnodes,services) /etc/inittab System Initialization Table /etc/passwd User Verzeichnis /etc/rc{runlvl} Run Level Boot/Stop Commands /etc/rc{runlvl}.d/... Boot/Stop Commands /etc/security/limits AIX User Limits (wie z.B. Hard und Soft File Sizes) /etc/services TCP/IP Dienste-Verzeichnis /etc/system Solaris System Kernel /etc/vfstab File System Description Table /home/user/.cshrc individual C Shell settings at login and every new C Shell /home/user/.login individual C Shell settings at login (nach .cshrc) /home/user/.logout individual log out processing /home[1]/user Home Directory /opt/IBM/db2/V8.1 Sun DB2 V8.1 Installation /opt/IBM/db2/V9.1 AIX DB2 V9.1 Installation (w/o Package Management) /usr/lpp/db2_... AIX DB2 Package Library /usr/opt/db2_08_01 AIX DB2 V8.1 Installation /usr/sap/<SID>/SYS/profile /DEFAULT.PFL SAP R3 Executables, Utilities, User Exits /usr/sap/<sid>/SYS/exe/run SAP Executables, Utilities, User Exits /var/adm/{ras|log} wichtige System Log Files /var/db2/vxx/defaults.env DB2 Global Registry /var/db2/vxx/profiles.reg DB2 System/Node Directory /var/sadm/{install|patch} Solaris Packages: versions and patches (e.g. FixPaks) ^d End Input <Esc>+k | <Esc>+j Command Editor vi: previous | next command (scroll) admintool Solaris Admin GUI (X-Window) alias [shortcut="cmd"] alias r='fc -s' Pseudonym or Shortcut for a command or cmd series, e.g. simple 'repeat last command' as "r" apropos keyword Hinweise zu Schlsselwrtern Path / File / Command Funktion at Execute Command later: at -m 0730 tuesday sort <f1 >f2 at now <enter> cmd at -l List defered Command Execution banner text Creates big letters bc Builtin Calculator bfs file AIX: Scans a file, displays requested lines Boot Process AIX AIX System Boot Sequence or changing Run Levels: shutdown (script) or boot init (program) /etc/inittab: sysinit + rc + per level: /sbin/rc.boot lvl + /etc/rc 2 + /etc/rc.d/rc lvl /etc/rc.d/rclvl.d /[K|S][0-9]script (symbolic links to /etc/rc.d/init.d) start or kill legacy systems Boot Process Solaris Solaris System Boot Sequence or changing Run Levels: shutdown (script) or boot init (program) /etc/inittab: initdefault, /sbin/rc2 /etc/rc2 /etc/rc2.d [K|S][0-9]script start or kill legacy systems bootinfo -K AIX Kernel 32/64 Bit enabled, or ... ls al /unix displays symbolic link to Unix Kernel bootinfo r AIX display real memory in kilobytes bootinfo y AIX display if the hardware is 32-bit or 64-bit cat [options] file -n View File - number lines chmod mask file Change Access Modes: 3 x r/w/x/- fr Owner/Group/other x=exec w=write r=read chmod -R m f Recurse into Sub Path's chmod u+s | g+s | +t Setuid-Bit, Setguid-Bit, Sticky-Bit (4000/2000/1000) chown o.g file Change Owner o=owner/g=group chown R o.g. f Change Owner, recurse into paths cleanipc instance-no SAP: like ipcrm, removes [shared] memory segments clear clear terminal screen cmd | grep o s filter with options ans search patterns -i ignore case (upper/lower caps) cmd |{pg|more} Writes to console page by page controlled by user compress file Compress (siehe Uncompress) cp f1 d2 Copy von File1 nach Directory2 cp f1 f2 Copy von File1 nach File2 cp opt f1 f2|d2 -f unlink -i prompt before overwrite -p preserve permissions -r recurse into subdirs cpio parms find . print | cpio -ov >/dev/rfd0 Copy Files into or from an Archive, for example Copy all File of Directory to Disk crontab -l Liste der Crontab Aktivitten curt -i AIX: CPU Utilization Reporting Tool Seite 2 DB2 Administrators Unix Command Surival Sheets (AIX + Solaris) Ausgabe 06/2008 www.ruban.de Gernot Ruban, D-71032 Bblingen 2009 Path / File / Command Funktion date [format] Ausgabe des Dates [in versch. Formaten] db2am DB2 Activity Monitor (use client GUI) db2fm i inst f|-a on|off Fault Monitor per Instance options, see also ./sqllib/fm.[hostname].reg db2fmcu d Stops db2fmcd daemon Fault monitor process and removes entry from /etc/inittab (see /db2-inst-path/bin) db2ls List installed DB2 V9.1 products and features db2mtrk -i -d -p m [-v] [-r n n] DB2 Memory Tracker: Report of Memory Status for Instances, Databases and Agents db2osconf Recommendations for Solaris Kernel values (root Users): -h Help Screen -f compare to current -l List current db2pd Information from the DB2 memory sets (sysadm): -inst Instance-Scope Info -everything all DB Info -alldbs all Databases -dynamic SQL Statements -osinfo Operating System -tcbstats TBSpace Info db2support d db m n no Creates DB2 Support (Zip) File for IBM technical support db2trc on ... db2trc dmp db2trc.dmp db2trc off db2trc flw db2trc.dmp db2trc.flw db2trc fmt db2trc.dmp db2trc.fmt DB2 Trace starten: zu analysierenden Prozes starten Dump Trace into File Trace off, Trace Flow und Trace formatiert in separate File ausgeben dbx a <pid> | <file> detach <pid> quit Debugging eines Binaries oder eines lfd. Prozesses, ohne detach wird <pid> beendet. (im Anschlu gencore <pid> <file>) df -k Display Free KB Block on File Systems diff f1 f2 Differences between Files diff -rsl f1 f2 Differences, recurse, long, all files disp+work -v SAP R/3 Release Level Display dpmon pf=profile SAP R/3 Display Queue Statistics, numerous arguments, profile in /sapmnt/<SSID>/profile dmesg Solaris Display System Messages du -k Disk Usage in KB, -a for each file -s Summary egrep opt "string" file -c -i -e pattern -l Extended grep Command: - count results - ignore case - search for patterns, egrep -l -e "(sed|awk)" * - print only files names with matches eject Eject (e.g. CD-Rom) errpt [-a] AIX Error Reporting, auch im Detail exit End Session/Shell export DISPLAY=ipaddr:0 Redirection of X-Window screen output fc [-l | -s nn] Command History File, list or start cmd file file Classify File Content/Type Path / File / Command Funktion filemon AIX File Access Monitor, Performance: filemon v o ofile O all dd if=file1 of=file2 bs=1k count=100000 trcstop fileplace options file Placement of file in LV and/or PV p physical volume -l logical volume -i indirect blocks -v details, degree of fragmentat. find . -name f1 Suche File f1 in diesem Pfad und allen Subdirs find . -type f name test* -print -exec grep -i "ruban" {} \; Suche alle Files (Type f) mit Namen test* in diesem und allen Unterverzeichnissen, gebe den Namen aus durchsuche sie per grep Command nach String ruban finger -s Short Infos on active Users finger user Find Infos about User ftp File Transfer Programm: open host user user psw get|put file [file] close and quit fusage Solaris Disk Access Statistics fuser [opt] device path -c -d -k -u -x Lists the process numbers of local processes that use the local or remote files specified by the File parameter: - open files in the file system - open files which have been unlinked - SIGKILL signal to process (root only) - login name for local processes using - executable/loadable objects (with -c or -f) getconf a AIX: Configuration Information grep opt pat f -i -n -l Search File f for Pattern pat with Option opt ignore case print line numbers print only names of files with matching lines groups Show Group Membership of User head -nnn file die ersten nnn Zeilen einer File ausgeben history See "fc -l", set history=nn ifconfig a Display machine IP address instfix -i [-k n] AIX List Installed Fixes IXnnnnnn instfix -i | grep ML AIX Maintenance Level, siehe Text All filesets for ..., siehe auch oslevel ioo L AIX display tunables characteristics iostat s System iostat a Adapter AIX File System Performance (History active? lsattr -E -l sys0 -a iostat) iostat -xnP Solaris File System Performance (detailled Device) ipcrm {-m|-q|-s} id Remove IPCs (-m=Shared Memory, -q=Message, -s=Semaphore-ID ipcs [-ma] Interprocess Communication System , Shared Memory Usage Status anzeigen jobs -l PID und Working Dir von Jobs Seite 3 DB2 Administrators Unix Command Surival Sheets (AIX + Solaris) Ausgabe 06/2008 www.ruban.de Gernot Ruban, D-71032 Bblingen 2009 Path / File / Command Funktion kill -9 pid Kill pid immediatelly and all children (Signal Kill SIGKILL=9, see kill -l) kill pid Kill Process mit ID pid last Display Last Logins leave hhmm Wecker listusers List User Login Information llstatus AIX SP: information on Load Leveler machine status ln -opt sf tf Make Links from Source to Target File -s Symbolic Link -f replace existing link lqueryvg -At -p hdisk0 AIX all attributes for the VG (Disks, see lspv) ls options file List Directory Structure -al lange Liste mit Attributen -R recurse subdirs t sortiert nach Timestamp -u used timestamp lsattr -E -l device AIX Show Device Attributes, e.g. Disk Device lsattr -El sys0 -a realmem AIX Display Real Memory lscfg | grep proc AIX Display Number of Processors lscfg -vp | pg AIX Hardware Information lsconf AIX List Configuration (siehe auch prtconf) lsdev C H AIX Device Information of customized devices lslpp -l AIX List installed Software Packages lslpp -qLc AIX query and report installed Software e.g. for compare lsps option AIX Display Paging Space: -a display size s summay/usage lspv [-p|l|L disk] AIX List Physical Volumes and Volume Groups lsvg {l|-L} vg-name AIX LVs in VG | VG attributes lsvg -L -n device AIX Display VG on a physical device e.g. hdisk lsvg -o | lsvg -i -l AIX Display Logical Volumes sortiert nach Volume Groups lvmstat l|-g name AIX LV Statistics (like iostat but on LVs or VGs) man cmd Manual Pages zu Unix Commands memlimits SAP R/3 address space configuration test tool metastat [-s id i t p] Solaris Metadevice Information (LVM, s.a. lsvg, lslv) mount [all] Show Device Table or mount if /etc/filesystems indicates mount=true (also: smitty mount) mpstat Solaris Processor Status ( pstat -S) mv -opt f f|d Move/Rename File to File|Directory netstat/nfsstat Netzwerk Aktivitt newgrp group Log in with another Group (non-primary) nslookup ip-addr|name Name Server Look-up function oslevel [-r|-g] AIX Maintenance Level, oder alternativ siehe instfix passwd [-d] [login name] Passwowrt ndern/lschen perl -MDBI -e 'DBI-> installed_versions' Listet Versionen der Perl Database Interfaces (auch DB2 unter DBD::DB2) perl V Perl Version, stored at ls al `which perl` perspectives AIX: Invokes SP Perspectives GUI pkginfo -l List installed Solaris Software Packages pprof <time> AIX Measure CPU usage of Kernel Threads Path / File / Command Funktion prstat [-a] Solaris report active process statistics ( top/topas) prtconf System Configuration Info (siehe auch lsconf) prtdiag System Diagnostics ps Report Process Status -ef Full List all Processes -l Long Listing -o format ps von /usr/ucb Extended UCB Process Status -a all -S accum CPU Time -x w/o Terminal -l Long Listing ps au Display Commands and Arguments ps -efo THREAD AIX Full List of all Threads in process ps eww [pid] Display Environment Variables of process id psrinfo Solaris Processor Information pstat -f (various flags) AIX Display interpretation of various system tables, e.g. -a|-p process table, -f file table, -S processors, -s swap and paging space usage ptree a pid|uid Solaris show process tree pwconv erzeugt /etc/shadow aus /etc/passwd pwd Print Current Working Directory rm -opt file Delete/Remove Files: -f force without prompting -i ask for confirmation -R/r recurse into subdirectories Run Levels | Init states 0: power-down state 1: administrative state 2: multiuser state 3: dflt., multi user operation, all resources avail. 4: alternative multiuser state 5: power-down state 6: reboot with initdefault in /etc/inittab (i.e. 3) S: single user (root) access only rup Up Time Remote Machine saposcol -h SAP R3 Operating System Data Collector sar -opt t n -s hhmm Startzeit -e hhmm Endezeit System Activty Reporter (siehe sa1, sa2, sadc in man) -u CPU -r Memory -g Paging -v Processes -d Disk I/O -P ALL per Processor Statistics schedo L AIX the current, default, and reboot settings sendmail ricipient-list SMTP Send Mail set -o vi Editing Commands as used in vi set -vx Shell Script Debugging setenv DISPLAY ip-addr:0.0 Route X-Windows output to specific console showipc instance-no SAP: wie ipcs, Anzeige von Memory Segments showrev [-p] Solaris Systemeigenschaften/ Patch Level shutdown -Fr AIX Fast Reboot shutdown -i6 Solaris: Shutdown and reboot (see Run Levels) smitty Interaktive AIX Command Konsole Seite 4 DB2 Administrators Unix Command Surival Sheets (AIX + Solaris) Ausgabe 06/2008 www.ruban.de Gernot Ruban, D-71032 Bblingen 2009 Path / File / Command Funktion smitty nfs -> NFS -> Add a directory to Export List -> /export/samplepath (Export now/at system restart) snap AIX: Sammelt System Informationen (Root) spmon AIX SP Monitor: -d Display -power off|on node1 Strom aus|an starsap [r3|db|all] SAP R3 Start Script Instance and/or Database startx AIX Start X-Windows Session (see DISPLAY) stopsap [r3|db|all] SAP R3 Stop Script Instance and/or Database su [-] user Switch to another User [- changes env] -c cmd Execute cmd, then return svmon AIX Memory Usage Monitor sysdef -i Solaris System Resource Limits tail -nnn file die letzten nnn Zeilen einer File ausgeben tar switches archive [files] Process Archive File -xvf Extract File -cf Create File tee -a file Display and writes output to file e.g. ls -al | tee -a directory.txt time cmd Elapsed/System/User Time for Command top|topas Report local system information ( prstat) tr tr '{}' '()' < f1 > f2 tr -d '\015' < in > out Deletes or substitutes Characters - wandelt Klammern um entfernt ^M (DOS Zeilenumbruch) traceroute ip-addr Trace der IP-Strecke tvi file Line Editor Full Screen ulimit [H]a All (Hard) User Limits umask [mask] Maskierung fr User Files (Komplement verwenden) uname M|m AIX Display Machine Type/Model and ID uncompress file Uncompress (siehe Comress) uptime System Load der letzten 1/5/15 Min. vi file Browse/Edit File :q quit :q! quit w/o save :w write file esc-dd remove row esc-x del char esc-shift-a end esc-i insert char esc-o inser row vi file Line Editor vmo L AIX Virtual Memory information Path / File / Command Funktion vmstat [opts intval count] -s summary -i interrupts sinc startup -v VMM statistics -t prints timestamp Statistics: Processes, Memory, Paging, Faults, CPU, Disk r kernel threads on run queue, run-able threads b avg number of kernel threads on wait queue avm number of pages allocated to paging space free number of free memory frames ( 4KB) re number (rate) of pages reclaimed pi no. (rate) of pages paged in from paging space po no. (rate) of pages paged out to paging space fr number (rate) of pages freed (VMM LRU) sr no. (rate) pages scanned by LRU daemon cy rate of complete scans of Page Frame Table in number (rate) of device interrupts sy number (rate) of system calls cs number (rate) of context switches us percent of CPU time spent in user mode sy percent of CPU time spent in system mode id CPU idle time wa waiting on I/O page ins page is read from disk to memory pages outs writing pages to disk paging space page ins only pages read f. paging spc paging space page outs only pages writtem f. pag.space w[-hsuw] Current System Activity (1, 5, 15 Minuten) wc -opts file Word Count -w Words -l Lines whereis name Locate binary, source, man page in /usr/... which cmd Pathname of Command who [am i] -b -r who is on system, what is my account Last System Boot Time System Run Level (usually with boot time) whodo l Jobs being performed by users on the system. wlmcheck AIX: WLM Prfung mit Ausgabe der Configurationswerte wlmstat AIX: WLM Resource Utilization Status wsm AIX: System Manager Start (X-Win, von Telnet aus) xargs i cmd Execute comand, receive input from standard input. ls -al * | xargs -i date +"Snapshot %Y-%m- %d-%H.%M.%S: {}" e.g. snapshot view of a path Xsession Solaris Start CDE X-Window Session
Seite 5 DB2 Administrators Unix Command Surival Sheets (AIX + Solaris) Ausgabe 06/2008 www.ruban.de Gernot Ruban, D-71032 Bblingen 2009 Kernel Processes AIX 4.3/5.xL (kprocs): aios Relates to Asynchronous I/O kernel process cdpg A kernel daemon that deals with CDRFS filesystems and is started only when a CD based filesystem is mounted. dlci A kernel process dealing with Data Link Control protocol. You will see this kproc mostly on systems using old protocols such as SNA. Some old printers also use this protocol. dog A kproc spawned by the netinet driver and deals with IP packet switching. The concept of dog process also came from Open Software Foundation (OSF). gil GIL term is an acronym for "Generalized Interrupt Level" and was created by the Open Software Foundation (OSF), This is the networking daemon responsible for processing all the network interrupts, including incoming packets, tcp timers, etc. lvmbb A kernel process associated with LVM device driver. jfsc This is a JFS daemon that does compression/decompression for compressed file systems. It is started when you mount a locally locally mounted compressed file system. It should go away when there are no mounted compressed file systems. You can use the dumpfs command to check if you have any compressed file systems. j2pg Kernel process integral to processing JFS2 I/O requests. jfsz JFS zero'ing kproc, allocate/zeros out disk blocks on 'bigfile' filesystems. kbio NFS biod threads -- works just like a biod process. lrud Least recently Used Daemon or "page-stealer" is dispatched when the Virtual Memory Manager (VMM) needs to free memory. There is one of these kprocs for each memory pool (Default: number of CPUs/8, minimum number of memory pools1). netm Network memory allocator that allocates pinned memory for use via netmalloc kernel services. reaper A kernel process that deals with cleaning up defunct processes. rtcm RPC transport connection manager used by the NFS kernel extension. swapper Part of the kernel scheduler and schedules threads on the processors' run queue. wlmsched Kernel process that aids Work Load Manager. Usually, inactive (but in process table) unless WLM is being used. xmgc A kernel process that deals with garbage collection for kernel memory allocated via xmalloc and xmfree kernel services. There are some kprocs that directly influence performance. These kprocs still do not have a user interface but their behavior can be influenced. aios The min and max number of this kproc can be tuned via SMIT. smit chgaio > Minimum number of servers and MAXIMUM number of servers lrud Behavior of this kproc can be influenced by vmtune/vmo's options. The most common options are when it is dispatched (minfree) and what type of memory pages ity prefers (maxperm and maxclient). swapper The swapper's behavior can be influenced by tuning with schedtune or schedo.