Ȼ/02

Top / Ȼ / 02

Typing Basics: ԥ󥰤δ

Dzơܡɤΰԥ󥰤δܤˤĤƴñ˿Ƥ. ȤΤ⡤ܡɤΰΤʤȡΨǤʤ򹯾ǽ뤫Ǥ

warning.png ܡɤȤäԥ󥰤δܤϡʲλ縶§뤳ȤǤ.

  1. ǤĤȤ˥ܡɤ򸫤ʤ(å).
  2. ǤĻؤܤ˱äƷƤ.
  3. ؤ֥ۡݥפ˾᤹.

äˡ

οͻؤѥۡݥ[F]
οͻؤѥۡݥ[J]

ˤϤܤߤФĥ꤬ĤƤơäǥۡݥʬ褦ˤʤäƤ(֥ܡ). 饭δܤȥۡݥϼΤ褦ˤʤ(κѤμ web ǡפ޼Ѹ忧). touchtype-image.png

Warning of typing injury, Selection of keyboard: Typing Injury ηٹȥܡɤ

ԥ塼̾狼Ĺ֤ϤäƻѤʹ֤ϡƬ, ˤߡ秾ξ㳲(Typing injury, ܤȿϫ㳲(Repetitive Strain Injury))ʤɤξ㳲Ǻޤ뤳Ȥ롥 ǡֿޤȻؤδط򸫤Ƥ狼褦ˡ̾Υܡɤϻؤؤô˴ؤƹŪ¤򤷤Ƥʤ(¤٤). ̾ΥܡɤĹֻѤ뤳ȤˤϥꥹΤǤ롥 Ф͡ʰŪθˤȤŤŪʷ򤷤֤¸ߤΤǡǤΤ򤷤褦.

ͤΤᡤܡɤˤäƤ礶äѤܰ¤򼨤Ƥ. ߤ⤢ΤǡδŪʤΤǤϤʤΤʤϥޥ.

ܡɤɤܰ
ֵΥηå
A : ɤûErgonomic ڤåDataHandʤ.˹. ȤʤޤǤ˻֤. ꤬ܤǤ񤷤.
B : ɤErgonomic ڤåKinesis ʤ.. 礭. ꤬ܤǤϤ񤷤.
C : (ڤ or ä) åHappy Hacking Keyboard, Realforce ʤ.Ū². ꤷ䤹.
D : ɬå̵Ť롤ڤ.̾䤵Ƥ륭ܡɤ¿ϤǤ.ۤȤɤ˰². 򹯤򳲤붲쥢

notes.png ½

  1. ͥåȥŬʥԥեȤõФƤߤ.
  2. 嵭 A, B, C ΥܡɤˤĤĴ٤Ƥߤ. PC ԤϡʬѤƤ륭ܡɤΥ󥯤ɤ٤Ƚꤻ.
  3. ʹ֤ΤФ٤ˡȤơɤΤ褦ʤΤͤ뤫ʬǹͤƤߤ补

Misc Commands ¿ʥޥ

ɤȤ뤬ʬषˤޥɤñ˲⤹.

# ܤϥ饤ޥ˥奢Ĵ٤.

clear
̥ꥢ. ^L ѤǤ뤳Ȥ¿.
date
դȻɽ.
cal
bc
׻. ñʥץߥ󥰵ǽ⤢ꡤʤʤȤ.

Gnome-Preferences.png n! η׻

   > bc -l         bc θ ϥե  ʸΥ롥
     bc 1.06
     Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
     This is free software with ABSOLUTELY NO WARRANTY.
     For details type `warranty'.
     
     define f(n) {
       z = 1;
       for ( i=1; i<=n ; i++) {
         z = (z*i);
         };                                 ֤ˤƤȤʴ
       return (z);
       }
     
     f(1)
     1
     
     f(3)
     6
     
     f(10)
     3628800
     
     define fact(n) {
       if (n==1) return(1) else return(n*fact(n-1));   ƵȤʴ
       }
     
     fact(20)
     2432902008176640000
     
     quit          ^d ǤѤǤ.
script
üɽƤΥ(̤)Ȥ. unix Ԥδܥޥɤΰ. ȵϿĤȤ˻ȤΤǡɤФƤ. ̤Υ桼ˤȤäƤǤ. 㤨н ȥޥ˥奢ˤ⤢(^-^).
lpr
(ե).
a2ps
ƥȥե Postscript եѴ. unix ޥ˷ҤäƤץ󥿤 Postscipt ץ󥿤Ǥ뤳Ȥ¿ΤǡϥƥȥեǽѴ롤ȤȤ̣.
enscript
ƥȥեˡƽϤ롥a2ps ꤺäɤȤȻܸ̾ˤб
lynx, w3m
ʸü web ֥饦.

notes.png ½

  1. 1 1000 ޤǤ¤᤿. bc ȤäƤˡŪ˽Ҥ٤.
  2. lpr ̿ᤷ뤬ץ󥿤ξ㤷ᤳΰä. ˤϤɤΤ褦ʥޥɤѤФ褤.
  3. lynx , w3m ѤƤ web ˥Ƥߤ. 餬󥹥ȡ뤵ƤʤФʤɤ
  4. script ȤäƺȵϿȤȤơscript Ѥ֤(ƥݥ)ǥ쥯ȥäơƤߤơΥǥ쥯ȥäȤϢưԤʤ.ޤκݤεϿǧ.

File Operations: ե

unix Ǥϥǡ¿ϥեȤ¸뤿ᡤե˴ƤळȤϽפǤ롥 ǡ ޤե뤽ΤΤλȤߤ⤷θ˥եˤĤƳؽ.

File System Structure: ե륷ƥ -- ι¤

unix Ǥϥե뤿ˡ§ȤƤäηΥեȥǥ쥯ȥ꤫ʤ볬Ūե륷ƥѤƤ. ˡǥ쥯ȥγع¤ʰܤڹ¤(ĥ꡼¤)Ȥ뤳Ȥǡƥι¤ŪʤΤˤƤ롥

ե륷ƥ๽¤ΤΥץ뤵 unix Υե륷ƥ礭ħǤ.

ե
unix ǤΥǡʪŪΤ˵Ȥñ̡Ȥǡβ. 桼̾ΤĤǡΤΤΤ褦˸. unix ǤϴŪ˰षʤ.
ե˴ؤ륳ޥɷμबǺѤ.
ǥ쥯ȥ
桼鸫Ȥunix ǥեƤꡤ⤷ȢΤ褦ñ. ꡤȻפäƤɤ⤷ʤ. ǥ쥯ȥˤϥե뤷ǥȥ. MS-windows Ǹե. ϥե̾եΤȤ
ڹ¤
tree-sample-s.png
ؤǤñ줫(^-^). ȤäƤ⡤̤񤷤äʤơȻޤʤ޷()ΰǡᤫ¾ػޤ̤äƤԤɬ̤ꤢäơġΰ̤ꤷʤȤΤ򥰥Ǥϡڡפȸ¤ڹ¤Ȥ. unix Υե륷ƥΤ򡤥ǥ쥯ȥ = ,ե = ,Ȥơǥ쥯ȥ äƤʪ(ե,ǥ쥯ȥ)θ˻ޤĤդˤ, ޤˤι¤ˤʤ. ϶ǤϤʤ줫鼨褦ˤʤΤǤ.
롼ȥǥ쥯ȥ(root directory)
ե륷ƥڹ¤ƤߤȤ־ǥ쥯ȥ򤤤. ϡڹ¤ä֤Ƥߤȡ(롼)ˤ뤳Ȥ餽. Υǥ쥯ȥ unix Ǥ / Ȥɽ. ΥѥΡֵפΰĤȤʤǤ.
ȥǥ쥯ȥ(current directory)
unix Ǥϡ֤ޤɤΥǥ쥯ȥưƤ뤫פռ롥 cui Ǥϥ뤬ɤưƤ뤫ȤȤˤʤ. ΡָߺȤ򤷤Ƥǥ쥯ȥפ򥫥ȥǥ쥯ȥȤ.
ѥ(path)
file-image-s.png
ե륷ƥڹ¤ƤߤȡɤΥեɤΡ = üפˤʤäƤ. ơڹ¤顤ɤΥǥ쥯ȥ꤫⤽ΥեޤǤƻ(path)ɬߤ롥 ǡΥե뤬ɤˤ뤫ꤹˡȤơ֤ɤƻڡפѤ뤳Ȥˤơѥ̾(path name)ȸƤ. ǥ쥯ȥȥǥ쥯ȥ(ե)Ȥδ֤ڤ뵭Ȥ / Ѥ.

# ϡֻޡפǥ쥯ȥեˤʤȥդλޤΤȤưȤ˺𤹤ΤǤƤ.
ʤѥϡ֥եνפȹͤʬ䤹. ñ򼨤Ƥ.
address-tree.png file-tree.png

Хѥ
ѥ̾εȤƥ롼ȥǥ쥯ȥѤˡ. Ƭɬ / Ĥ.
Хѥ
ѥ̾εȤƥȥǥ쥯ȥѤˡ. Ƭ / ĤƤʤϤ찷
warning.png ХѥХѥΰ㤤Ͻ鿴ԤϤ褯𤹤Τǡդ뤳.
ƥǥ쥯ȥꡤȥǥ쥯ȥ̤ɽ
ɤΥǥ쥯ȥǤɽ̤ʥǥ쥯ȥ꤬Ĥ.

.. (ԥꥪ): ƥǥ쥯ȥɽ. ƥǥ쥯ȥȤϡʬޤޤʳ礭ʥǥ쥯ȥΤ.

. (ԥꥪɰ): ȥǥ쥯ȥɽ. Υǥ쥯ȥˤեֳμ¤ˡ׻ꤷ˻Ȥ 㤨СΥǥ쥯ȥ hoge Ȥե뤬Ȥ顤./hoge ȻꤹСϤΥǥ쥯ȥˤե뤬μ¤˻ꤵ줿Ȥˤʤ.

Commonly Used File-Operations: ̾ե

pwd
ߤǥ쥯ȥ(ȥǥ쥯ȥ)򼨤.
cd ǥ쥯ȥ̾
ꤷǥ쥯ȥذư.
pushd ǥ쥯ȥ̾
ꤷǥ쥯ȥذư.
ޤǤΥȥǥ쥯ȥ򵭲ƤΤǡpopd Ȥ߹碌Ǥ.
popd
pushd ǵƤǿΥǥ쥯ȥ.
ls
ǥ쥯ȥƤꥹɽ. ǤɤȤޥɤΰĤʤΤǡŬڤʥץ alias ǻꤷƤ褦ˤΤ褤.

Gnome-Preferences.png ls
bash ξ: alias␣ls='ls␣-Fa'
tcsh ξ: alias␣ls␣ls␣-Fa

touch␣ե̾
ե򿷤˺.
ϥեΡֻ°פѹ륳ޥɤ¸ߤʤե̾ꤹȤΥե뤬.
cp␣ե̾␣ư
ե򥳥ԡ.
mv␣ե̾␣ѹ
ե(ǥ쥯ȥ)ư or ̾.
rm␣ե̾
ե(ǥ쥯ȥ)õ.
unix ǤϾõǡϸʤᡤΤ˥ץ-i ʤɤ alias ƤΤ˾ޤ.
ln␣-s␣ե̾␣ե̾
ܥå󥯡Τ1Ĥ塤եʣˤ. -s ץĤʤϡɥ󥯤⤢뤬ޤ̤ϻȤʤ
ܥå = ե̾ = windows ǤΡ֥硼ȥåȡפȻפ(Τˤ)狼䤹
mkdir␣ǥ쥯ȥ̾
ǥ쥯ȥ.
rmdir␣ǥ쥯ȥ̾
ǥ쥯ȥõ.
cat␣ե̾
եɽ(ϡե礹륳ޥ).
more␣ե̾
եɽ. ˥ǤɽʵǽĤĤƤ.
less␣ե̾
եɽ. more ⤵. 饤ޥ˥奢ɽʤɤѤ.
wc
եΥñԿɽ.
du␣-k␣ǥ쥯ȥ̾
ǥפɽ.
ꤷǥ쥯ȥʲγơΥǥ쥯ȥˤեιץ򼨤. ʬϤɤ줯餤ǥȤäƤΤʡ ʤƤ.
nkf
Ѵޥ.
̾ windows unix ǤϥեѤ(ǥե)ɤԥɤۤʤ뤿ᡤޥɤˤϤʤꤪäˤʤ뤳Ȥ

Gnome-Preferences.png nkf
ƥȥե windows mac ȤȤꤷΤȤˡ

windows ѤΥե򿷤: nkf␣--windows␣<␣ե̾␣>␣ե̾
unix ѤΥե򿷤: nkf␣--unix␣<␣ե̾␣>␣ե̾
mac ѤΥե򿷤: nkf␣--mac␣<␣ե̾␣>␣ե̾

tar
(ơ)ե륢. ¿ΥեޤȤưĤΥեȤơֽ(arhive)פ롤Ȥưΰ٤Υޥ. ե밵̵ǽ̵.
# ơפȤʬϸߤǤϥ桼ˤϤޤ̣Ϥʤ.
windows/dos Ǥϻ褦ŪΤΥġȤơ zip lha ʤɤΤƤ.
tarλȤˤĤƤϡХååפˤĤƳؽݤ˾ܤ⤹.
whatis
apropos θ̩. apropos ϤʤäȤ?
which␣ޥ̾
ޥɥץबɤˤ뤫򶵤. ѥѿ椫餷õʤ.
whereis␣ե̾
ޥɤ˸¤餺͡ʼΥեõФ. եμϥץǻ.
find
ǥ쥯ȥڹ¤򲼤زؤȲäƤʤեõơԤʤ.
㤨Сȥǥ쥯ȥ(.) ⲼΥǥ쥯ȥǥե̾ν꤬ .txt ǤեõȤȤ
find . -name '*.txt' -print
Ȥʤ. / ʤ󤫤ǻ褦ʤȤȤҤɤܤˤΤǤ褯ͤƤ¹Ԥ뤳(^-^).
file␣ե̾
եμȽꤹ. եȤ˿ʤȽǤΤǡ(^-^).
diff␣ե̾1␣ե̾2
ĤΥƥȥեΰ㤤ɽ. äȤ㤦ϤΥե뤬ɤ㤦ΤΤ.

notes.png ½

˼ޥɤ򡤥饤ޥ˥奢ѤĴ٤ʤ̤Ƥߤ.

Permissions for File Operations: ե륷ƥ -- եݸ

unix ǤϥȤˤäѸ̤륿פΥեݸȹޤƤ.

ϡޥ桼ƥȤƤεǽΰĤȤơեλѸ¤򤭤ΤǤ. ٤ϡġΥեǥ쥯ȥˡƥȤˤƤɤĤΤꤵƤ롤ȤȤˤʤ.

ե͡ /ػ ϥ桼ǤΤǡ椹뤳Ȥ¾桼鼫̩ǡäꡤǡ򴹤Ԥʤäꤹ뤳ȤǤ.

εΤȤեѡߥåȤե⡼ʤɤȸƤ.

եѡߥåϡΥեïˡס֤ɤ׵ or ػߤ뤫ꤹΤǤ.ޤˤϡ

  • ïˡפ ֽͭԡס֥ե륰롼פ°͡ס֤ʳο͡פ 3ࡤ
  • פ ɤ߹ߡסֽ񤭹ߡסּ¹ԡפ 3

Τǡ 9 Ĥ /ػ ꤹܤ. ʲեΡֽͭԡפȡ֥ե륰롼ספ˴ؤƴñƤ.

եͭ (Owner, User)
ե°ΰ. ΥեνͭԤïɽ.
ls␣-l ޥɤ3Ĥɽ.
ե()롼 (Group)
ե°ΰ. Υե뤬ɤΥ롼פ°Ƥ뤫ɽ. Ǥ롼פȤϡ̾桼ʬहȤˤѤ륰롼פΤ.
ls -l ޥɤ4Ĥɽ.

"Looking" of File Permissions: եѡߥåָ

ޤեѡߥå 9ĤܤɤʤäƤ뤫Ĵ٤ˡˤĤƿ褦.

̾ϡls -l Ȥޥɤ¹ԤȤ˰ֺ˽Ф10ʸ󤫤ʤܤʡ֥ե⡼ɤɽפȤӡθ¦ 9ʸեѡߥåɽ.

# Ƭ 1ʸϥեΡַפȤФ졤"d" 1ʸξϥǥ쥯ȥ"-" 1ʸξϥե̣롥

եѡߥå [3ʸβ x 3] ι򤷤Ƥꡤβơ
ֽͭԤФǧġ
֥롼פФǧġ
֤ʳФǧġ
̣.

ʸϳơ

"r"
ɽФǽ
"w"
߲ǽ
"x"
¹Բǽ(ǥ쥯ȥξ硤õǽ)

̣Ƥꡤʬ "-" ΤȤϤֶػߡפƤ뤳Ȥ̣. ʾޤȤȡɽΤ褦ˤʤ.

ls␣-l ޥɤɽκǺü 10 ʸɤ
ե⡼
եѡߥå
ͭԤФ롼פ° user ФʳФ
d:ǥ쥯ȥ
-:ե
ɽФ
r:
-:ػ

w:
-:ػ
¹
x:
-:ػ
ɽФ
r:
-:ػ

w:
-:ػ
¹
x:
-:ػ
ɽФ
r:
-:ػ

w:
-:ػ
¹
x:
-:ػ
12345678910

Gnome-Preferences.png ѡߥå˴ؤɽ

㤨Сls␣-l ¹ԤȤ

 drwxr-xr-x  1 paoon  Lab       512   3 26 22:45 tmp
 -rw-------  1 paoon  Lab      6665   3 26 22:45 dummy1
 -rw-r-----  1 paoon  Lab     50102   4  5 22:19 dummy2

ɽ줿Ȥȡ

  • tmp Ȥǥ쥯ȥϡ
    • ͭ paoon ɤߡ񤭡ǽ.
    • 롼 Lab °桼 ɤߡǽ.
    • ʳΥ桼 ɤߡǽ.
  • dummy1 Ȥեϡͭ paoon ɤߡ񤭤Ǥ.
  • dummy2 Ȥեϡ
    • ͭ paoon ɤߡ񤭤ǽ
    • 롼 Lab °桼 ɤߤǽ.

ȤȤ狼. Ҥ륳ޥ chmod ȤС°񤭴ΤǡʬΥեݸ٥ͳǤ뤳Ȥ狼.

"Change" of File Permissions: եѡߥåѹ

եѡߥå椹ˤϡ chmod ȤޥɤѤ. ܺ٤ϥ饤ޥ˥奢򻲾ȤȤơޤʸˡϰʲ̤Ǥ.

chmod␣␣ե̾
[ugoa][+-=][rwx] ηɽ. ʸΰ̣ϳơʲ̤.

u ͭԤФ̣.
g 롼פ°륢ȤФ̣.
o ʳΥȤФ̣.
a ȤФ̣.

+ Ḥ̂.
- ػߤ̣.
= ()ʳ϶ػߤ̣.

r ɤ߽Ф˴ؤ̣.
w 񤭹ߤ˴ؤ̣.
x ¹(ǥ쥯ȥξϸ)˴ؤ̣.

ޤƥ뤬󶡤ޥɤȤơumaskȤޥɤ(ˤäƵǽʸˡۤʤ).ΥޥɤѤȡեȤ˼ưŪꤹѡߥåǤ. bash, zsh ξʤɤ chmod Ʊɽǡֽ͡פǤ.

̾ϥѡߥåïˡפȤ 8ʿɽ(octal notation) 3οǥޥͤꤹˡʤΤǡȤϤ񤷤.

Gnome-Preferences.png ѡߥåѹ

chmod␣u=rw,␣og=r␣ե̾
ѡߥå rw-r--r-- Ȥ. ̾ΥեϤƤФ褤.
chmod␣u=rw,␣og-rwx␣ե̾
ѡߥå rw------- Ȥ. ᡼䤽¾̩ι⤤եϤƤ٤Ǥ.
umask␣u=rwx,␣go=rx (bash, zsh ξ)
ե뤬̾Υѡߥå rw-r--r-- Ȥ.
umask 022. ̾ϡΤ褦 8ʿ3οǥѡߥåΥޥͤꤷʤȤʤ.
umask␣-S (bash, zsh ξ)
ե뤬̾Υѡߥå꤬ɤʤäƤ뤫ѡߥåɽɽ.
umask
ե뤬̾Υѡߥå꤬ɤʤäƤ뤫8ʿ3οɽ.

How to Use Online Manuals: Ȥ߹ߥޥɤΥ饤ޥ˥奢ΰˤĤ

umask Τ褦ʥȤ߹ߥޥɤϡ饤ޥ˥奢ΤˤäȤĤɬפǤ. ʲ˳ƥˤζŪˡ򵭤Ƥ.

bash, tcsh Ȥ߹߷ϥޥɤˤĤĴ٤ˤ
(j)man␣bash (j)man␣tcsh Ȥƥ饤ޥ˥奢ɽƤ顤ǤΥޥɤʸ(㤨 umask ʤ)õФ褤.
zsh Ȥ߹߷ϥޥɤˤĤĴ٤ˤ
(j)man␣zshbuiltins Ȥƥ饤ޥ˥奢ɽƤ顤ǤΥޥɤʸ(㤨 umask ʤ)õФ褤.

notes.png ½

  1. touch ޥɤѤŬʥեchmod ȤäƼΤ褦˥ѡߥåѹƤߤ.
    1. ïˤǤɤ߽񤭡¹ԤǤ褦.
    2. ïˤǤɤᡤ¹ԤǤ뤬ʤ褦.
    3. ʬɤ߽񤭡¹ԤǤ褦.
    4. ʬǤɤΤ褦.
  2. touchޥɤѤƼʬΥǥ쥯ȥŬʥե٤ʤοͤΥեɤ뤬񤭹ߤϤǤʤ褦ˡchmod ȤäŬڤ˥ѡߥåꤻ.θ塤Τ٤ʤο֤ͤΥեɤ뤬񤭹ߤϤǤʤפȤǧ.

Text Files and Editors: ƥȥեȥǥ

ǥȤϥեȤľԽ뤿ΥեȥΤȤǤ. unix cui ĶȤäƤ֤ȾϡޥɤѤƤ뤫եԽƤ뤫ǤΤǡǥѤ֤¿Ȥˤʤ. ǡǤϥǥˤĤƾܤ⤹.

ޤǥǼ˰եηǤƥȷˤĤƲ⤷줫饨ǥˤĤƲ⤹롥

Text Files: ƥȥեˤĤ

unix ǤϡեϤʤ٤ƥȥեȤ¸뤳Ȥ˾ޤȤ. ƥȥեȤϡʹ֤ɤʸǥǡҤ줿եΤȤ򤤤. Ǥʤե̤˥ХʥեȸƤ֡

# ,եΤ褦ˡ̤ʤ礭ʤեʤɤϡǤե򾮤ǤХʥեŬƤ뤬ΰʳϥƥȥե뤬˾ޤ

ƥȥեȥХʥեΰ㤤 less ʤɤΥեޥɤǥե򸫤ƤߤаǤ롥

Хʥեʸ󤬥񤭴ƤޤȤ¿Τǡ¤ϤϤᤷʤ(^-^) եˡfileʤɤѤơեΤ򸫤Τ ޤ, ɤƤХʥեȤ򸫤ƤߤȤϡ cat␣-v vis ѤΤ褤(ɤޥ˥奢Ĵ٤뤳).

ƥ/Хʥե 򸫤Ƥߤͻ
text-sample.png
ƥȥեȤ򸫤Ȥʴ
binary-sample.png
ХʥեȤlessʤɤ̵긫褦ȤȤʴ.

ƥȥե뤬ɤȤͳϼΤ褦ʤΤǤ.

  • ƥȥեϸǿʹ֤Ǥ(˴ؤ⤤).
  • ƥȥեǤФ줳ʽǤ. ʤʤ顤unix ˤϥƥȥեȾưŪ˽ġ뤬˭٤ˤ뤫Ǥ(μȤdzؽ).
  • OS 䥽եȤδ֤ǤѴߴ⤤. äơեȤ OS ΰ㤤ۤѲǽǤ.



notes.png 㤨С20ǯΥǡեͤƤߤ褦
ΥեѤηΥեȡƥȥե뤬äȤơߤѲǽʥեϤɤ.

ϡĤѥեȡפˤȤäƤϵդԹǤ롤ȤȤ館뤿ᡤwindows ʤɤ OS ξѥեȤϵդ˥ǡƥȥեȤХʥեȸƤФեǥǡե벽뷹 Ĥޤꡤߴ㤯뤳Ȥˤäơ¾βҤΥեȤؤΰܹԤ˳,ʹ֤ɤʤ褦ˤơɤ򤷤Ƥ뤫򱣤,桼Υե̵Ǥϥե뽤ʤ褦ˤơΥեȤؤΰ¸ Ȥä礤Ǥ(ؤΰ¸Τ褦ʤΤ) Ѥϡwindows Mac OS ǤĹܤǸȥ桼ν٤夬ˤȤȤʤäƸ롥

ĤޤꡤХʥեǸߴ㤤򰷤եȤȤΤϡ桼رפ򿪤٤Ƥ񤵤Ƥʤդ˥桼ϤեȤ򤹤褦Ҥɬפ롥

ơʾ¬ǤȻפunix cui ĶǥեԽȤϤƤϥƥȥե򰷤Ȥ̣(㳰Ϥ󤢤)

Editors: ǥˤĤ

ǥ(Editor)ȤϡեԽ٤ΥեȥǤ롥ܤԽեˤä

ƥȥǥ( = ƥȥեԽ)
Хʥꥨǥ( = ХʥեԽ)

ȸƤʬ뤬̾ϥǥȸХƥȥǥؤȤ¿ζ̤Ϥޤ굤ˤʤ.μȤǰΤƥȥǥǤ. ƥȥǥѤȤϳǰŪˤϰʲΤ褦ˤʤ.

ǥѤȤΤ褽 editor-image-s.png

ǥκǤŵŪʻȤϡʲ̤ˤʤ롥

  1. ԽեΥХååפȤ(!).
  2. (ǥư)
  3. Խե򥨥ǥɤ߹ࡥ
  4. ǥԽ롥
  5. ԽѤǡեȤƽ(save)
  6. (ǥλ)

Ȥήˤʤ롥

ǥ unix cui ĶǤϺǤˤѤ륽եȥΰĤǤ.ʤʤ顤ʹ֤ computer ˥ǡϤݤ˺Ǥ褯ѤˡΰĤϤǡեȤϤ뤳ȤǤ. äơunix cui ĶȤʤˤ, ǥͳߤ˻ȤʤʤȤʤ.unix cui ĶѤ륨ǥμϤ¿ϤʤΤǡ륨ǥ˴¾ΥǥܰܤꤹȤȤϤʤ.ʲˡɽŪʥǥ򼨤ΤǡɤƽϤΤ褤.

unix cui ĶǤ褯Ѥ륨ǥ
̾ħ
viunix ̾ΤĤ OS ʤФְܴۤ㤤ʤǥեȤäƤ륨ǥ.
ǥȤƤεǽ˹ʤä߷פˤʤäƤ, ѤʴĶǤưư®.Ƥư֥ޥɡפȤηϲƤꡤܡɤǺȤΨ褯Ǥ褦ˤʤäƤ뤬ϵդ˥ޥɤ򵭲ɬפ뤳Ȥ̣.
# ʤȤޤʤȽϤǤʤᡤΥǥ侩ΤϾ(ǮŪʥե¿).
unix ȤΥ󥹥ȡΤʤᤤʳȤ륨ǥǤ뤳,OS ȤưʤäƤȤǤưǽ⤤Ȥʤɤ,unix ԤϹȷȤ˴ؤ餺 vi Ȥ褦ˤʤʤȤʤ(¤Υ٥ǹʤ).
emacselisp Ȥǽ񤫤줿ޥեѤƤۤܤ륫ޥǽͥĽʥǥ.Ŭڤꤹ, emacs 椫 OS ƹԤʤȤǽǡǥȤ unix ĶΤΤǤȤ.
unix ǺǤɤȤƤ륨ǥϤ餯 emacsǤ.
ΥǥϤ꽬Ϥˤϻ֤פ뤬vi ٤㤤.ɤ餫Ȥ emacs 򥨥ǥȤƿ侩.
vi ƱͤˤۤƤ unix ĶǻȤ뤬vi ƥΥǥեȤѰդƤ륨ǥǤΤФemacs ϤۤܥǥեȤѰդƤ륢ץꥱ󥽥եȡȤΩǤ.
# Ǥ뤫顤emacs Ȥʤ֤ unix ĶȤΤ⤤Ǥ¸ߤ.

嵭ħ¬ǤȻפunix cui ĶѤ륨ǥȤƤϰʲΤ褦˿侩뤳Ȥˤʤ. unix ФȤͤ򤹤Τ褤

#ۤʤȤ߹碌ǽǤ. ǽŪˤϹߤǤ.

  • ̾桼ˤ emacs
  • ()unix , Ԥˤ vi Τñ + emacs 侩(Ȥɬܤ˶ᤤ).

How to Develop Your Skill of Editor Opeartions: ǥνϤˤĤ

cui ĶǤϥޥ˥塼ȤäեǤϻȤʤȹͤ٤Ǥ롥ĤޤꡤܤľŪϤǤʤΤᡤɤΥǥˤϤʤνϤɬפǤ롥

ȡǽ餫ȤʤʤƤʤΤǡꤲꤷʤǤäȤǤΤ褤

Backup: ХååפˤĤ

˺ƤϤʤʤȤơֿʹ֤ϥߥ򤹤פȤΤ.ԥ塼Ϥβ˹Ԥʤʤ, Ȥǹܤ˲񤦤Ǥ. եΥХååפ, եӤԽȤǤΥߥФݸΰĤǤ.ϼΥǡƤХååפ٥rcs,sccs ȤäС󥳥ȥ륽եȤλѤȷͤΤʤɤ뤬ˤĤƤϸμȤDz⤹.

Ǥ, Ǥñ OS ˰¸ʤѤˡȤꤢҤƤ.

Gnome-Preferences.png 㤨Сdummy.txt ȤեΥХååפ˵󤲤Ƥߤȡ

   > ls dummy.*     褦̾Υե뤬̵å
   dummy.txt
   
   > cp dummy.txt dummy.txt.bak-20110422     ܤǥХååפʬ褦
                                               Ƥɤ

ȤƥХååפäƤ.ˡȥХååץե뤬Ƥ, ʬˤΤǴˤ, ΥǥåȤ礭, Хååפʤ 100ܥޥǤ. ꤭ȤХååפˡˤĤƤϤ줫μȤdzؽ.

Emacs: ǥ emacs -ðۤǽ-

emacs ȰˤäƤ⡤¿첽򲡤ʤƤХꥨȤƤ mule,եǤ򶯲Ƥ xEmacsʤɤκ٤Хꥨ󤬤롥Ǥ emacs ΥС󤬾夬ˤĤ礵ƤޤϤʤ٤ŪĶ̤Ǥ cui ǽǰ褦ˤʤ ޤʹߤ emacs Ƚ񤤤Ϥ¿ΥХꥨޤȤƸƤǤΤȤ.

ưˡ
kterm emacs emacs␣& emacs␣-nw ȥޥɤϤ롥

emacs ʸüפ̤ emacs ư
emacs␣& emacs Хå饦ɥ֤ȤƵư(ܤϥץ򤹤Ȥdzؽ)
emacs␣-nw emacs kterm ˴ cui ⡼ɤǵư.
λˡ
emacs C-x C-c (C- "[Ctrl] 򲡤ʤ" ̣).
Խ
ޤ祬(Tutorial)˽äƳؽΤ褤. 祬ɤ emacs ˤϤۤɬѰդƤ.
emacs ư, C-h␣t [F1] t Ϥ祬ɥ⡼ɤ.
emacs ư塤⤷ʤDz̤ɤߤȡ
C-h t XEmacs λˡμ½򳫻ϤǤޤ

Get a tutorial f1 t

Type C-h t for a tutorial on using Emacs
ʤɤȤɽ. Τ褦˺¤ˡϺǽɽΤ,ޤϤäꤳβ̤ɤΤɤ.
emacs Ǻä
emacs Ѥ򤷤Ƥޤäơɤ褤ʬʤʤ뤳Ȥ.ȤϡƤ C-g 򲿲Ϥ褦.ΥϡưΥޥɤߡפΤǡѤξ֤֤̾ᤷƤ.
֤Ƥޤäפ򸵤᤹ΤǤϤʤ.äȤ undo ޥɤѤ. Ūˤɤ褤祬ɤdzؽ褦.
ɽ줿ϤƤưʤ?
祬ɽ줿򤷤Ƥ⤽̤ưʤȤȤ.ϡθĿʹĶǤϡ֥񤭴Ƥפ˵븽ݤǤ.ΰ٤ˡɸŪʥꤷƽ񤫤ƤΤȰäƤΤǤ.
~/.xemacs ~/.emacs ʤɤˤΡ֥񤭴פ񤫤Ƥ뤳Ȥ(ٸƤߤ.¾ˤʤȤ񤤤Ƥ).
㤨СإפƤӽФǤC-hʸõȤư򤹤褦˽񤭴Ƥ뤳Ȥ롥Τᡤ祬ɤC-hȽ񤤤ƤʬϤΤޤϤƤ⤦ޤʤȤȤˤʤ.
ϡ[F1]Ƥϥإפˤʤ褦ˤʤäƤΤǡC-h[F1]򲡤Ф褤.
emacs ᤯Ȥʤ褦ˤʤꤿ
ɤ⤦

Tips to Use Emacs: emacs ᤯ȤʤΤĤ

륭Ȥ!
emacs ˤϸΨŪ˥ưˡ˭٤¸ߤ.륭ȤȤΨŪˡȤʤʤäƤޤᡤ̤Ȥ emacs 򤤤ĤޤǤäƤȤʤʤȤߤȤȤˤʤ. 륭ϡֽ鿴ѤפǤäơְ츫ڡפǤϤäƤָǵ㤯פȤˤʤΤΤ٤Ǥ. ޤ륭Ȥˤϼۡݥ󤫤礭餹Ȥˤʤꡤô塤٤ʤ. ֥륭襭ܡɤ¸ߤʤΡפǤ⤢뤳Ȥ򼫳Фemacs ǤФ˻ȤʤΤ cui 桼ѤǤ(^-^).
ޥȤ!
ۤͳƱǤ.emacs ȤǥޥȤͳϤۤȤɤʤ.
ñȤ򷫤֤!
ΤȤϼưǤ롤ǽ롤ȤΤ emacs Ǥ. ƱȤ䡹Ƿ֤褦ʤȤ̵ȿʤˤƤ褦Ǥ emacs ϤĤޤǤäƤȤʤʤ. Ȥ¿ʤꤽä顤Ȥ˼ݤ emacs ˤȤưŪ˹Ԥʤ褦ʵǽʤޤĴ٤٤Ǥ.

emacs ˡϤ١ֳФʤȤʤ.ΤᡤǽŬʥޥ˥奢긵ѰդƤ, ʬǥ򤷤Ƥ򸫤ʤȤ褦ˤȤ褤. emacs Ϥ⤷Ȥ줫鲿ǯȤȤˤʤġǤΤ, äȳμ¤˻Ȥ褦ˤʤΤɤ.

notes.png ½

  1. emacs ưtutorial (ˡμ½)Ԥ.
  2. ޥɤѤŬʥեemacs ѤƤȤŬʸϤ񤭹¸塤emacs 򤤤äλ.
  3. emacs ươۤɺƽ񤭹ʣΥեƤĤΥեˤޤȤľ.

Vi: ǥ vi -Simple is BEST!!-

vi ˤ emacs Ʊ¿ΥХꥨ󤬤뤬ϤǤŪʤΤؽΤ褤. unix OS ¿Ǥ vi μΤϼ¤ vim Ȥֲɤ줿vi Ǥ. Τᡤռ vim βɤ줿ǽ(⡼ɽǽʤ)ȤƤޤ(^-^).

ưˡ
kterm vi ȥޥɤϤ롥
λˡ
vi ([Esc] ٤ϸ) ZZ (Z ʸ) ⤷ :x :wq :q! .

ZZ λ. Խ save Ƥʤե뤬ȽλǤʤ. :q ϤΤƱ.
:x λ. ̤save ե save .
:wq ե save ƽλ.
:q! ե save ˶λ.
() λˡ¿Ƥ狼ˤ, :wq :q! ȤռƻȤ褦ˤΤǤ褤.
Խ
vi 򤹤ˤϡvi Ρ֥⡼ɡפޥηϤ򤭤򤹤ɬפ(ɤ餫򤹤Ф褤). Ǥ, ̾ɤȤ֥⡼ɡפˤԤʤäƤ. ޥηϤˤ˴ؤƤ, ȿ޽ " The Unix Super Text()()" 18.2 (pp.255-) ɤΤɤ.
¾ܺ٤Ⲽ˵
vi Υ⡼
οޤȲɤ⤦

Modes of Vi: vi Υ⡼

vi Υ⡼ɤγǰ vi-mode.png

vi Υ⡼ɤ绨Ĥ˼Τ褦ʬव.

ޥɥ⡼
vi δܥ⡼. ưʸԤʤ.
ʸϤ⡼.
exޥɥ⡼(⡼)
: פ򲡤ȤΥ⡼ɤˤʤ. ե OS (ɽˤ)ִʤ. vi νλ OS ȤΤȤȤȤǤʬव.

warning.png [Esc] 򲿲󤫲ɬޥɥ⡼ɤˤʤΤǡɤΥ⡼ɤˤ뤫ʬʤȤϤȤˤ [Esc] 򲿲󤫲Ф褤.

Operations of Vi: vi Խ

ʲ vi ԽǺɬפʤΤ򵭤. vi Ϸ빽Τạ̇̄Τϻʸʤɤ򻲹ͤˤٶΤ褤.

vi Խɽ
ʬǽȤ⡼
ưhإưޥɥ⡼.
j.
k.
l.
0 (0)Ƭ.
$.
0 (0)ƬԤ.ex ޥɥ⡼
$ǽԤ.
iΡפ⡼ɤ˰ܹ.ޥɥ⡼
aΡָס
oΤԤΡּιԤȤơס
r ե̾եƤ.ex ޥɥ⡼
Žդ
(paste)
p⤷ϥԡ줿Ƥ.ޥɥ⡼

(cut)
xʸ.
ddԺ.
DޤǺ.
JιԤβʸκĤޤꡤιԤȼιԤȤҤ1Ԥˤ롥
d ưϤưޤǤ.
C-hʸ
C-uԺ
ԡ
(copy)
yyԥԡ. Ȥ p Žդ뤿˻Ȥ.ޥɥ⡼
y ưϤưޤǤ򥳥ԡ. Ȥ p Žդ뤿˻Ȥ.
Ρָפ˸äƸ.
Ρפ˸äƸ.
nƱ,ִ.
c ưִ.
ưƤ⡼ɤ˰ܹԤΰ֤ư֤ޤǤ⡼ɤϤʸִ.
%s/ʸ/ʸ/gִexޥɥ⡼
֤.ľԽޥɤ򷫤֤ޥɥ⡼
uľԽޥɤäƸ᤹
եؽ
(save)
w ե̾ե˽.ex ޥɥ⡼
λwqե˽Ǥ齪λ.
q !ե˽ޤ˽λ.
xsave Ƥʤϥե˽Ǥ齪λ.
ZZsave ƤΤ λ.ޥɥ⡼

To be good at Vi: vi ˽Ϥ뤿

rogue-sample.png

unix ˤϼ¤ vi Ʊ֤Υưĥब¿¸ߤ. ͷ֤Ȥ vi Υ֤Τ߹ޤ롤Τ 20ǯʾĹˤͳ濫ؽˡ(^-^)ǤΤǡˤͤˤϤǤ.

ŪˤϡRogue,Hack,Nethack,Larn,Moria,Omega,Angband,ADOMʤɤΤạ̇̄ΤϥͥåȥʤɤĴ٤ƤߤȤ褤. windows Mac ˰ܿ줿Τ¿Τǡ PC ͷǤߤΤ褤. ˤϥեʤΤ䡤ޥץ쥤䡼бΤΤʤɤ⤢.

kterm rogue ưȤͻҤǤ.(rogue ϥ󥹥ȡ뤵ƤʤᡤƼѰդɬפ)

notes.png ½

  1. ޥɤѤŬʥեvi ѤƤȤŬʸϤ񤭹¸塤vi 򤤤äλ.
  2. ԥ塼˾ܤͤˤꤤʤɤơrogue θƤߤ.

Report: ݡ

ּ½פȵ줿ʬˤĤơǽ¤긭ĴȹͻԤ
AppliedMath7-Report-02
Ȥ̾Ĥ e-mail ˤƶ˥ݡȤȤФ. ʤݡȤ e-mail TeX Ǻ̤ˤФƤ褤.





about Icons, ClipArts

For details, see JNorth_arrow-right-sm.png this.