Unix Technote Overview

<introduction>

A basic operation using unix


at:

-l list -r remove atq == at -l atrm == at -r atrm -a all <Vi>: x delete i insert :quit! :x

mail:

more: h=help espace=page suivante :n Next fichier :p Previous fichier q: quitter

- Changer Password : passwd ou yppasswd (->NIS)

- Directory : ls - Affichage a l'ecran : more - Sortie sur imprimante : lpr -Pnom_imprimante nom_du_fichier - Aide : man commande what mot_clef apropos mot_clef - Connaitre place occupe : du

- Changer autorisations d acces chmod etendu modification droit etendue

a all tous o other monde g group groupe u user soi-meme modification - supprimer ce droit seulement = donner pour l´etendue ce droit seulement + ajouter ce droit droit Fichier r lecture w ecriture,modification x execution Directory r droit de faire un ls w droit de creer un fichier x droit d´acceder aux fichiers (lecture,ecriture,execution)

B Utilisation du systeme:


- Editeur: xedit filename, vi filename (avec curseur !)

- Arreter une session temporairement: <Ctrl> Z - La refaire partir: fg - recherche d'un mot: grep mot filename - extraction: <sed> ex: sed -e '/^BEGIN/d' -e '/^END/d' << \End_of_Section > $pfile.$part extrait entre BEGIN et END

Fonction unix de base:


more: h=help

espace=page suivante :n Next fichier :p Previous fichier q: quitter see <od overview>

split -c taille fichier source fichier(S)

ex: cat toto |split -> cree n fichier x** de taille 1000 cat toto |split -c 100000 -> cree n fichier x** de taille 100000 decoupe un fichier

<find>

find directory_de_depart -name fichier -print find directory_de_depart -user username -print <od> <dump> decimal, hexa (<xd>==<hd>, etc ...

3 Utilisation du mail:


C FTP

E Compilateur



Debugger Tools


<sdb>

<dbx>

AIX <CV>
<EL> enter Long

<gdb>

<gcc>

autres commandes unix


-1 ORACLE


<sqlplus>

<sqldba>


<UNIX>


0 Process

<ps>

liste des process

<jobs>

-> liste des process en background

<nice>

<renice>

<fg>

%# -> repasse le process en foreground

<kill>

<zonk>

I Aide


<man>

command

II Editing a file


<cat>: concatenes and print files

<more>

: view file one page at a time

<cut>

- cut out seletected fields of each line of a file

<paste>

- merge same lines of several files or subsequent line of one file

<pg>

view a file on screen with a specific presentation

<awk>

manipulate file to extract information using a "c" language
samples:

<regex>

- string extractor

<echo>

echo a string to the screen

<regexp>

<cmp>

- compare two binaries files

ScoUnix

<diff>

- give diff between two files

<expr>

- test existence of file or compare strings <test> - test existence of file or compare strings <[]> test for ksh <[]> test for csh <grep> research a pattern of string into files <find> - list file 29/09/95 29/09/95 <xargs><joker> - Constructs parameter lists and runs commands. 21/10/98 sample script:

find $1 \( -type f ! -name $3 ! -name `pwd`/$3 \) -print |xargs grep $2 >>$3


<sed>:file modifier <vi> : screen oriented (visual) display editor <pr>: print file
III application ********************************************************

<mail> : <talk> : <mesg>


IV System **************************************************************** <at> programm a command to be scheduled at a specific time <cron> <crontab> program scripts to be run regularly <cronadm> <su> substitute user role <time> - time a command <timex> - time a command (different format) <cktime> - prompt and display time <getdate> - prompt and display date <date> - print current date & time
<netstat> <iostat>

<VMM> <VIRTUAL MEMORY MANAGEMENT> <vmstat> <vmtune> <ipcs> <ipcrm> <lsps> <sag> - system activity graph (for graphic device terminal) <sar> - statistic about Unix usage (CPU,Disk access, Process, Paging, Swaping)


<uname> <lslpp> -l bos.rte.filesystem done numéro version du sous système <fuser> <pstat> <crash>
<lsof> site: www.bull.de (shareware) fileset (install -r) <assmgmt> - manage /etc/shadow & /etc/passwd <pwconv> - updates /etc/shadow from /etc/passwd <passwd> <chuser> <chsec> <loginlog> - log of failed login attempts <last> - list last login <chgrp> - change group ownership of a file <newgrp> - log into a new group <groups> - list groups of current user <pwck> - password group file checker <groupadd> - create a new group <groupdel> - delete a group <groupmod> - modify a group <passwd> - /etc/passwd <chown> - change owner and group of a file <useradd> - create a user <usermod> - modify a user <userdel> - delete a user <profile> <newgrp> - change dynamically group id
<ln> - link file 19/06/96 19/06/1996 18:38 <cp> - copy file 25/07/1996 10:15 12/09/1996 18:22 <du> - space used 07/08/1996 14:58 07/08/1996 14:58 <df> - space free 07/08/1996 14:58 07/08/1996 14:58 <bdf> - list file 07/08/1996 14:58 07/08/1996 14:58 <lsfs> - list file 29/09/95 lundi 27 avril 1998 <lsdev> - list file 29/09/95 lundi 27 avril 1998 <ls> - list file 29/09/95 lundi 27 avril 1998 <which> - find file in path 29/09/95 29/09/95 <whence> <type>

##VI <File> manipulation ************************************************

<rm>:delete file <chmod>: 29/09/95 30/11/1995 15:40 <acledit>: change Access Control List of a file (extended rights) <umask> <chgrp>: 19/12/95 30/11/1995 15:40 <chown>: 19/12/95 30/11/1995 15:40


VII Netware **************************************************************** <rlogin>- remote login (name the machine == tcp/ip alias)
Commands to identify users

<hostname> give the name of the hos <who> <who am i> <whoami> see <talk> <finger> <rwho> Ask For Server Load


command to test the net <ping> - ping a machine <netstat> show net status <arp> Ethernet Conversion -> Ip
Command to backup <gunzip> - GunZip <tar> - archive sur bande <compress> <uncompress> <dd>
Volume Manager

<mklv> Make Logical Volume Aix 4.2 <rmlv> Make Logical Volume Aix 4.2 <mt> <lsdev> -Cc tape


<ftp overview> <ftp standard> <ftp wyse> <ftp SCO-UNIX> <ftp DOS> <ftpd>(ADMN) 28/11/1995 17:36 28/11/1995 17:36
<nfs> commands 09/09/1996 11:41 09/09/1996 11:41 <exports> <exportfs>
<man> command
<time>: time a command
<cktime> : prompt and display time <getdate> : prompt and display date
<alias> shortcut for online command
<Rsh> <ksh -r> Kornell restricted shell <readonly> empeche de modifier le contenu d'une variable <sh -d> Bourne restricted shell


##NOTES sur le shell <ksh> <POSIX> <Korn Shell> <AIX>
<for> for i in *.inp; do diff $i v2/$i; done extrait de man Korn Shell <$> <~> <~+> <~-> home and working directory substitution

In addition, the shell attempts tilde substitution when the value of a variable assignment parameter begins with a tilde ~ character.

You can also substitute arithmetic expressions by enclosing them in ( ) (parentheses). For example, the command:

<$()>


##NOTES sur le shell <sh> 10:58 15/06/1995 19/07/1996 16:31 <sh> <sh-posix> Bourne shell <comment> <set> <$><${}> Variable assigment and substituion <environement variable> Major environment variable that affect execution <Input / Ouput> <File Name generation> <Quoting> <eval> [arg] <exec> [arg] <exit> [n] <export> [name ...] <getopts> <hash> [-r] [name ...] <if> [file1 -nt file2] (newer) <[]> test file <$> value of variable <for> identifier [ in word ... ] ;<do> list ;<done> <select> identifier [ in word ... ] ;<do> list ;<done> <case> word in [[(]pattern [| pattern] ...) list;;] ... <esac> <if> list; <then> list; [<elif> list; <then> list;] ... [<else> list;] <fi> <while> list; <do> list;<done> <until> list; <do> list;<done> <()> (list) subshell in current shell <{}> {list;} fork shell <[[ expression ]]><[[]]><test> <function(){}>
Notes sur le shell CSH: 10:58 15/06/1995 10:17 23/06/1995
<History> substitution delete and redirect

< >> > < >>! > < >>& > < >>&! >

append the standard output <set> <$>


<X11> <xedit> <X11 files> <mouse control> <X11 misc tools> <X11 system>

<shell programming>
<introduction> basic operation using unix
File n_unixv.htm End of File

Last Update : $Date: Jan 23 2002 16:04:42 $