Administració d'arxius i directoris
Ajuda del sistema operatiu
Tractament d'streams
Editors
Compressors
Gestió de processos i permisos
Diversos
Intèrprets de comandes

Administració d'arxius i directoris

ls: llista els fitxers del directori especificat, segons el paràmetre indicat.

	bash-2.05b$ ls
	hom10mod.aln  homolegas10-1.aln  homolegs10bis.fa~   homolegs3.aln  hompdb10swiss.aln  seq108.out2   seq1.bls2    seq38.out   seq5.fa
	hom10mod.dnd  homolegs10-1.dnd   homolegs10.dnd      homolegs3.dnd  hompdb10swiss.dnd  seq10.bls1    seq1.fa      seq38.out2  seq6.fa
	hom10mod.fa   homolegs10-1.fa    homolegs10dnd2      homolegs3.fa   hompdb.aln         seq10.bls2    seq1.out     seq3.bls1   seq7.fa
	hom10mod.fa~  homolegs10.aln     homolegs10.fa       homolegs3.fa~  hompdb.fa          seq10.fa      seq1.out2    seq3.bls2   seq8.fa
	hom3mod.aln   homolegs10.aln2    homolegs10.fa~      hompdb10.aln   seq108.bls1        seq10.out     seq1.outbis  seq3.fa     seq9.bls1
	hom3mod.dnd   homolegs10bis.aln  homolegs10tris.aln  hompdb10.dnd   seq108.bls2        seq10.out2    seq2.fa      seq3.out    seq9.fa
	hom3mod.fa    homolegs10bis.dnd  homolegs10tris.dnd  hompdb10.fa    seq108.out         seq1.bls1     seq38.bls1   seq3.out2   seq9.out
	hom3mod.fa~   homolegs10bis.fa   homolegs10tris.fa   hompdb10.fa~   #seq108.out2#      seq1.bls1bis  seq38bls2    seq4.fa
	
	bash-2.05b$ ls -l
	total 7824
	-rw-------    1 e18344.bio.acexs.au.upf 600        207279 mai 14 15:29 1aqn.ent
	-rw-------    1 e18344.bio.acexs.au.upf 600           288 mai 14 15:29 1aqn.fa
	-rw-------    1 e18344.bio.acexs.au.upf 600        107166 mai 14 15:29 1aqn.pdb
	-rw-------    1 e18344.bio.acexs.au.upf 600           286 mai 14 15:29 1bh6A.fa
	-rw-------    1 e18344.bio.acexs.au.upf 600        107221 mai 14 15:29 1bh6A.pdb
	-rw-------    1 e18344.bio.acexs.au.upf 600        208089 mai 14 15:29 1bh6.ent
	-rw-------    1 e18344.bio.acexs.au.upf 600           286 mai 14 15:29 1sbh.fa
	-rw-------    1 e18344.bio.acexs.au.upf 600        106784 mai 14 15:30 1sbh.pdb
	-rw-------    1 e18344.bio.acexs.au.upf 600           287 mai 14 15:30 1scja.fa
	-rw-------    1 e18344.bio.acexs.au.upf 600        107444 mai 14 15:30 1scja.pdb
	-rw-------    1 e18344.bio.acexs.au.upf 600            80 mai 14 15:30 1scjB.fa
	-rw-------    1 e18344.bio.acexs.au.upf 600         30884 mai 14 15:30 1scjB.pdb
	-rw-------    1 e18344.bio.acexs.au.upf 600           289 mai 16 14:35 1tece.pdb
	-rw-------    1 e18344.bio.acexs.au.upf 600          3141 mai 16 14:58 alinia.ali
	-rw-------    1 e18344.bio.acexs.au.upf 600          1263 mai 16 14:55 alinia.fa
	-rw-------    1 e18344.bio.acexs.au.upf 600            25 mai 14 15:30 clean.log
	-rw-------    1 e18344.bio.acexs.au.upf 600         11301 mai 16 14:38 homol52.1
	-rw-------    1 e18344.bio.acexs.au.upf 600         12084 mai 16 14:38 homol52.2
	-rw-------    1 e18344.bio.acexs.au.upf 600          1070 mai 16 14:48 homol52.22.aln
	-rw-------    1 e18344.bio.acexs.au.upf 600          1410 mai 16 14:47 homol52.22.aln~
	-rw-------    1 e18344.bio.acexs.au.upf 600          2430 mai 16 14:40 homol52.2.aln
	-rw-------    1 e18344.bio.acexs.au.upf 600        474094 mai 16 14:43 homol52.2.pdb
	-rw-------    1 e18344.bio.acexs.au.upf 600            70 mai 16 14:38 homol52.domain
	-rw-------    1 e18344.bio.acexs.au.upf 600            93 mai 16 14:37 homol52.domain~
	-rw-------    1 e18344.bio.acexs.au.upf 600        102958 mai 16 14:49 homol52.hmm
	-rw-------    1 e18344.bio.acexs.au.upf 600            35 mai 16 14:38 homol52.mat
	
	bash-2.05b$ ls *pdb
	1aqn.pdb  1bh6A.pdb  1sbh.pdb  1scja.pdb  1scjB.pdb  1tece.pdb  homol52.2.pdb
	

mv: renomena els fitxers

	bash-2.05b$ ls *pdb
	1aqn.pdb  1bh6A.pdb  1sbh.pdb  1scja.pdb  1scjB.pdb  1tece.pdb  homol52.2.pdb
	bash-2.05b$ mv homol52.2.pdb modelhmm1.pdb
	bash-2.05b$ ls *pdb
	1aqn.pdb  1bh6A.pdb  1sbh.pdb  1scja.pdb  1scjB.pdb  1tece.pdb  modelhmm1.pdb
	

mkdir: crea directoris.

	bash-2.05b$ ls -l
	total 12
	drwxr-xr-x    3 e18344.bio.acexs.au.upf 600          4096 jun  2 14:14 5.3
	-rw-------    1 e18344.bio.acexs.au.upf 600           174 abr 30 14:20 homolegs.dnd
	-rw-------    1 e18344.bio.acexs.au.upf 600             2 mai  6 15:22 homolegs.domain
	bash-2.05b$ mkdir exemple
	bash-2.05b$ ls -l
	total 16
	drwxr-xr-x    3 e18344.bio.acexs.au.upf 600          4096 jun  2 14:14 5.3
	drwxr-xr-x    2 e18344.bio.acexs.au.upf 600          4096 jun 10  2003 exemple
	-rw-------    1 e18344.bio.acexs.au.upf 600           174 abr 30 14:20 homolegs.dnd
	-rw-------    1 e18344.bio.acexs.au.upf 600             2 mai  6 15:22 homolegs.domain
	

rm: borra arxius i/o directoris

	bash-2.05b$ rm homolegs.dnd
	bash-2.05b$ ls -l
	total 12
	drwxr-xr-x    3 e18344.bio.acexs.au.upf 600          4096 jun  2 14:14 5.3
	drwxr-xr-x    2 e18344.bio.acexs.au.upf 600          4096 jun 10  2003 exemple
	-rw-------    1 e18344.bio.acexs.au.upf 600             2 mai  6 15:22 homolegs.domain
	

cp: copia arxius i/o directoris entre dues localitzacions.

	bash-2.05b$ ls
	bash-2.05b$ cp /disc9/BE/e16942/practica_5/homolegs.domain .
	bash-2.05b$ ls
	homolegs.domain
	

pwd: informa de la localització actual (directori on et trobes).

	bash-2.05b$ pwd
	/disc9/BE/e16942/practica_5
	

cd: canvia al directori especificat.

	bash-2.05b$ pwd
	/disc9/BE/e16942/practica_5
	bash-2.05b$ cd 5.3
	bash-2.05b$ pwd
	/disc9/BE/e16942/practica_5/5.3
	

cd ..: canvia al directori anterior.

	bash-2.05b$ cd ..
	bash-2.05b$ pwd
	/disc9/BE/e16942/practica_5
	

>>: concatena fitxers.

	bash-2.05b$ cat hba_leppa.sw
	>sp|P02020|HBA_LEPPA Hemoglobin alpha chain - Lepidosiren paradoxus (South American lungfish).
	MRFSQDDEVLIKEAWGLLHQIPNAGGEALARMFSCYPGTKSYFPHFGHDFSANNEKVKHH
	GKKVVDAIGQGVQHLHDLSSCLHTLSEKHARELMVDPCNFQYLIEAIMTTIAAHYGEKFT
	PEINCAAEKCLGQIVHVLISLYR
	bash-2.05b$ cat hbaz_caphi.sw >> hba_leppa.sw
	bash-2.05b$ cat hba_leppa.sw
	>sp|P02020|HBA_LEPPA Hemoglobin alpha chain - Lepidosiren paradoxus (South American lungfish).
	MRFSQDDEVLIKEAWGLLHQIPNAGGEALARMFSCYPGTKSYFPHFGHDFSANNEKVKHH
	GKKVVDAIGQGVQHLHDLSSCLHTLSEKHARELMVDPCNFQYLIEAIMTTIAAHYGEKFT
	PEINCAAEKCLGQIVHVLISLYR
	>sp|P13786|HBAZ_CAPHI Hemoglobin zeta chain - Capra hircus (Goat).
	SLTRTERTIILSLWSKISTQADVIGTETLERLFSCYPQAKTYFPHFDLHSGSAQLRAHGS
	KVVAAVGDAVKSIDNVTSALSKLSELHAYVLRVDPVNFKFLSHCLLVTLASHFPADFTAD
	AHAAWDKFLSIVSGVLTEKYR
	

chmod: modifica els permisos de fitxers i/o directoris.

	bash-2.05b$ ls -l
	total 12
	drwxr-xr-x    3 e18344.bio.acexs.au.upf 600          4096 jun  2 14:14 5.3
	drwxr-xr-x    2 e18344.bio.acexs.au.upf 600          4096 jun 10  2003 exemple
	-rw-------    1 e18344.bio.acexs.au.upf 600             2 mai  6 15:22 homolegs.domain
	bash-2.05b$ chmod 777 homolegs.domain
	bash-2.05b$ ls -l
	total 12
	drwxr-xr-x    3 e18344.bio.acexs.au.upf 600          4096 jun  2 14:14 5.3
	drwxr-xr-x    2 e18344.bio.acexs.au.upf 600          4096 jun 10  2003 exemple
	-rwxrwxrwx    1 e18344.bio.acexs.au.upf 600             2 mai  6 15:22 homolegs.domain
	

Ajuda del sistema operatiu

man: mostra l'ajuda de qualsevol comanda.

	bash-2.05b$ man ls
	LS(1)                                                                    LS(1)

	NOMBRE
       		ls, dir, vdir - listan los contenidos de directorios

	SINOPSIS
	       ls [opciones] [fichero...]
	       dir [fichero...]
	       vdir [fichero...]
	
	       Opciones de POSIX: [-CFRacdilqrtu1]

	       Opciones de GNU (en la forma más corta): [-1abcdfghiklmnopqrstuvwxABCD-
	       FGHLNQRSUX] [-w cols] [-T cols] [-I patrón] [--full-time]  [--show-con-
	       trol-chars]      [--block-size=tamaño]     [--format={long,verbose,com-
	       mas,across,vertical,single-column}] [--sort={none,time,size,extension}]
	       [--time={atime,access,use,ctime,status}] [--color[={none,auto,always}]]
	       [--help] [--version] [--]

	DESCRIPCIÓN
	       El programa ls lista primero sus argumentos no directorios  fichero,  y
	       luego para cada argumento directorio todos los ficheros susceptibles de
	       listarse contenidos en dicho
	

info: mostra més ajuda de qualsevol comanda.

	bash-2.05b$ info ls
	File: coreutils.info,  Node: ls invocation,  Next: dir invocation,  Up: Directory listing

	`ls': List directory contents
	=============================

	   The `ls' program lists information about files (of any type,
	including directories).  Options and file arguments can be intermixed
	arbitrarily, as usual.

	   For non-option command-line arguments that are directories, by
	default `ls' lists the contents of directories, not recursively, and
	omitting files with names
	

Tractament d'streams

cat: pagina corrents de dades.

	bash-2.05b$ cat hba_leppa.sw
	>sp|P02020|HBA_LEPPA Hemoglobin alpha chain - Lepidosiren paradoxus (South American lungfish).
	MRFSQDDEVLIKEAWGLLHQIPNAGGEALARMFSCYPGTKSYFPHFGHDFSANNEKVKHH
	GKKVVDAIGQGVQHLHDLSSCLHTLSEKHARELMVDPCNFQYLIEAIMTTIAAHYGEKFT
	PEINCAAEKCLGQIVHVLISLYR
	

less: mostra corrents de dades.

	bash-2.05b$ less hba_leppa.sw
	>sp|P02020|HBA_LEPPA Hemoglobin alpha chain - Lepidosiren paradoxus (South American lungfish).
	MRFSQDDEVLIKEAWGLLHQIPNAGGEALARMFSCYPGTKSYFPHFGHDFSANNEKVKHH
	GKKVVDAIGQGVQHLHDLSSCLHTLSEKHARELMVDPCNFQYLIEAIMTTIAAHYGEKFT
	PEINCAAEKCLGQIVHVLISLYR
	hba_leppa.sw lines 1-8/8 (END)
	

more: pagina streams.

	bash-2.05b$ more hba_leppa.sw
	>sp|P02020|HBA_LEPPA Hemoglobin alpha chain - Lepidosiren paradoxus (South American lungfish).
	MRFSQDDEVLIKEAWGLLHQIPNAGGEALARMFSCYPGTKSYFPHFGHDFSANNEKVKHH
	GKKVVDAIGQGVQHLHDLSSCLHTLSEKHARELMVDPCNFQYLIEAIMTTIAAHYGEKFT
	PEINCAAEKCLGQIVHVLISLYR
	

Editors

emacs

	bash-2.05b$ emacs hba_leppa.sw &
	

kwrite

	bash-2.05b$ kwrite hba_leppa.sw &
	

vi

	bash-2.05b$ vi hba_leppa.sw &
	

joe

	bash-2.05b$ joe hba_leppa.sw &
	

Compresors

gzip compressor

	bash-2.05b$ ls
	1bt4.fa             hba_leppa.sw   hbb_tarsy.bl   hbb_tarsy.out1  hbb_tarsy.sw  llistat.fa      serc_myctu.fa
	blast_search_1.out  hbaz_caphi.sw  hbb_tarsy.bl2  hbb_tarsy.out2  llistat.aln   probl1.out
	blast_search1.out   hbaz_human.sw  hbb_tarsy.out  hbb_tarsy.out3  llistat.dnd   serc_myctu.bla
	bash-2.05b$ gzip llistat.fa
	bash-2.05b$ ls
	1bt4.fa             hba_leppa.sw   hbb_tarsy.bl   hbb_tarsy.out1  hbb_tarsy.sw  llistat.fa.gz   serc_myctu.fa
	blast_search_1.out  hbaz_caphi.sw  hbb_tarsy.bl2  hbb_tarsy.out2  llistat.aln   probl1.out
	blast_search1.out   hbaz_human.sw  hbb_tarsy.out  hbb_tarsy.out3  llistat.dnd   serc_myctu.bla
	

gunzip descompressor

	bash-2.05b$ gunzip llistat.fa.gz
	bash-2.05b$ ls
	1bt4.fa             hba_leppa.sw   hbb_tarsy.bl   hbb_tarsy.out1  hbb_tarsy.sw  llistat.fa      serc_myctu.fa
	blast_search_1.out  hbaz_caphi.sw  hbb_tarsy.bl2  hbb_tarsy.out2  llistat.aln   probl1.out
	blast_search1.out   hbaz_human.sw  hbb_tarsy.out  hbb_tarsy.out3  llistat.dnd   serc_myctu.bla
	

zip compressor

	bash-2.05b$ zip llistat.zip llistat.fa
	  adding: llistat.fa (deflated 39%)
	bash-2.05b$ ls
	1bt4.fa             hba_leppa.sw   hbb_tarsy.bl   hbb_tarsy.out1  hbb_tarsy.sw  llistat.fa   probl1.out
	blast_search_1.out  hbaz_caphi.sw  hbb_tarsy.bl2  hbb_tarsy.out2  llistat.aln   llistat.tar  serc_myctu.bla
	blast_search1.out   hbaz_human.sw  hbb_tarsy.out  hbb_tarsy.out3  llistat.dnd   llistat.zip  serc_myctu.fa
	

tar: empaquetador (cvf) / desempaquetador(xvf)

	bash-2.05b$ tar cvf llistat.tar llistat.fa
	llistat.fa
	bash-2.05b$ ls
	1bt4.fa             hba_leppa.sw   hbb_tarsy.bl   hbb_tarsy.out1  hbb_tarsy.sw  llistat.fa   serc_myctu.bla
	blast_search_1.out  hbaz_caphi.sw  hbb_tarsy.bl2  hbb_tarsy.out2  llistat.aln   llistat.tar  serc_myctu.fa
	blast_search1.out   hbaz_human.sw  hbb_tarsy.out  hbb_tarsy.out3  llistat.dnd   probl1.out
	
	bash-2.05b$ tar xvf llistat.tar
	llistat.fa
	

Gestió de processos y permisos

ps: mostra els processos que s'estan executant al moment.

	bash-2.05b$ ps
 	 PID TTY          TIME CMD
 	2245 pts/5    00:00:00 bash
 	2250 pts/5    00:00:00 ps
	

kill: mata processos.

	bash-2.05b$ kill
	

top: mostra l'ocupació de la màquina pels processos.

	bash-2.05b$ top
	 1:21pm  up  1:06,  7 users,  load average: 0,00, 0,12, 0,23
	71 processes: 68 sleeping, 3 running, 0 zombie, 0 stopped
	CPU states:  1,3% user,  1,5% system,  0,0% nice, 97,0% idle
	Mem:   256260K av,  225808K used,   30452K free,       0K shrd,    4804K buff
	Swap:  524280K av,       0K used,  524280K free                  129476K cached

	 PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 	1090 root      19 -10 98832  16M  3640 S <   0,9  6,4   1:18 X
 	1601 e16942.b  13   0 11984  11M 10716 S     0,7  4,6   0:02 kdeinit
 	1621 e16942.b  11   0 14516  14M 12052 R     0,3  5,6   0:12 kdeinit
 	2248 e16942.b  11   0  1032 1032   816 R     0,1  0,4   0:00 top
   	1 root          8   0   484  484   420 S     0,0  0,1   0:04 init
    	2 root          9   0     0    0     0 SW    0,0  0,0   0:00 keventd
    	3 root         19  19     0    0     0 SWN   0,0  0,0   0:00 ksoftirqd_CPU0
    	4 root          9   0     0    0     0 SW    0,0  0,0   0:00 kswapd
    	5 root          9   0     0    0     0 SW    0,0  0,0   0:00 bdflush
    	6 root          9   0     0    0     0 SW    0,0  0,0   0:00 kupdated
    	7 root         -1 -20     0    0     0 SW<   0,0  0,0   0:00 mdrecoveryd
  	118 root        9   0     0    0     0 SW    0,0  0,0   0:00 khubd
  	700 root        9   0   456  456   400 S     0,0  0,1   0:00 dhcpcd
  	733 root        9   0   516  516   448 S     0,0  0,2   0:00 dhcpcd
  	787 rpc         9   0   532  532   448 S     0,0  0,2   0:00 portmap
  	801 root        9   0   584  584   476 S     0,0  0,2   0:00 syslogd
  	809 root        9   0  1132 1132   416 S     0,0  0,4   0:00 klogd
  	868 root        9   0   496  496   432 S     0,0  0,1   0:00 gpm
  	968 xfs         9   0  5720 5720  1028 S     0,0  2,2   0:00 xfs
 	1008 root       9   0     0    0     0 SW    0,0  0,0   0:00 rpciod
	

Diversos

alias: dóna sobrenoms a les comandes.

	bash-2.05b$ alias rasmol="/disc9/bin/rasmol"
	bash-2.05b$ rasmol
	RasMol Molecular Renderer
	Roger Sayle, August 1995
	Copyright (C) Roger Sayle 1992-1999
	Version 2.7.1.1 January 2001
	Copyright (C) Herbert J. Bernstein 1998-2001
	*** See "help notice" for further notices ***
	[32-bit version]

	Unable to find RasMol help file!
	RasMol>
	

Intèrprets de comandes

tcsh

	bash-2.05b$ tcsh
	[e16942.bio.acexs.au.upf@au491 practica_2]$
	

source: font des de la que executa els programes

	[e16942.bio.acexs.au.upf@au491 practica_2]$ source /disc9/cshrc
	[e16942.bio.acexs.au.upf@au491 practica_2]$