Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
UNIXという考え方
Search
ikuwow
September 28, 2015
1
1.9k
UNIXという考え方
ikuwow
September 28, 2015
Tweet
Share
More Decks by ikuwow
See All by ikuwow
Elasticsearch on EC2からAmazon Elasticsearch Serviceに 移行してだいぶ楽になった話
ikuwow
0
3.4k
意外と使える! Alibaba Cloud
ikuwow
0
220
teratailの解析基盤をEFKで作っていろいろ楽しい話
ikuwow
0
820
技術書紹介 パーフェクトPHP
ikuwow
0
2.1k
みんなもMiddlemanで技術ブログ作って幸せになろう!
ikuwow
0
930
PHPサイバーテロの技法 書籍紹介
ikuwow
0
870
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Unsuck your backbone
ammeep
669
57k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Fireside Chat
paigeccino
34
3.1k
Side Projects
sachag
452
42k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Done Done
chrislema
181
16k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
Transcript
ٕज़ॻհɿ UNIXͱ͍͏ߟ͑ํ ʙͦͷઃܭࢥͱֶʙ 2015/09/28 @ikuwow
ࣗݾհ • @ikuwow • ओʹPHPΛॻ͍ͨΓ͢Δਓ • ͖ͳϓϩάϥϛϯάݴޠ ɿγΣϧεΫϦϓτ • ࠷ۙͷΈɿ͍ؒ৺ͷεΩ
ϚΛຒΊଓ͚͖ͯͨͱ͋Δ ༏ϥδΦ͕์ૹऴྃͨ͠ @ikuwow
͖ͳϓϩάϥϛϯάݴޠ “γΣϧεΫϦϓτ”
͕ͦ͏ࢥ͏ཧ༝͕ ͜ͷຊʹ͋Δ
ຊͷ֓ཁ • 2001ॳ൛ൃߦʢΦʔϜࣾʣ • ബͯ͘ಡΈ͍͢ ʢ148ϖʔδʣ • ஶऀͷMike GancarzX Window
Systemͷ։ൃऀ • ٕज़ॻͰ͋Γֶॻ
UNIXͱ • ͏40Ҏ্༻͞Ε͍ͯΔݹ͍γεςϜ • BSDSolarisɺLinuxɺOS XͳͲͷੜOSʹ ͦͷεϐϦοτड͚ܧ͕Ε͍ͯΔ ݹͯ͘৽͍͠OS
UNIXͷܥ౷ਤ
͜ͷຊͷ͍͢͝ͱ͜Ζ • ໊ݴ͕ͷͨ͘͘͢͝͞Μ͋Δ • ৗతʹར༻͍ͯ͠ΔUNIX likeͳγεςϜͰ ͋ΔLinuxͷૉΒ͕͠͞Θ͔Δ • ཧతͳܗʹ͍ۙUNIXΛֶͿ͜ͱͰʮྑ ͍γεςϜʯʹ͍ͭͯͷཧղ͕ਐΉ
UNIXͷલఏɿ Ϣʔβʔ͕ࣗ ԿΛ͍ͯ͠Δ͔Θ͔͍ͬͯΔ
հ͞Ε͍ͯΔUNIXͷఆཧ • Small is beautiful • ҰͭͷϓϩάϥϜʹҰͭͷ͜ͱΛ͏·͘ΒͤΔ • Ͱ͖Δ͚ͩૣ͘ࢼ࡞Λ࡞͢Δ •
ޮΑΓҠ২ੑ • σʔλASCIIϑϥοτϑΝΠϧʹอଘ͢Δ • ιϑτΣΞͷᑏࢠΛ༗ޮʹ׆༻͢Δ • γΣϧεΫϦϓτΛ͏͜ͱͰᑏࢠͷޮՌͱҠ২ੑΛߴΊΔ • աͷରతΠϯλʔϑΣʔεΛආ͚Δ • ͯ͢ͷϓϩάϥϜΛϑΟϧλʹ͢Δ
Ұͭͷ͜ͱΛ͏·͘ΒͤΔ • Θ͔Γ͍͢ • อक͍͢͠ • γεςϜϦιʔεʹ༏͍͠ • ଞͷπʔϧͱΈ߹Θ͍ͤ͢ খ͍͞ϓϩάϥϜ…
copyίϚϯυ༷Λߟ͑ͯΈͨ 1.Ϣʔβʔʹίϐʔ͢ΔݩͷϑΝΠϧ໊ΛਘͶΔ 2.ϑΝΠϧ͕༗Δ͔Ͳ͏͔νΣοΫ͢Δ 3.ϑΝΠϧ͕ͳ͚ΕͦΕΛϢʔβʔʹ௨͢Δ 4.ϢʔβʔʹίϐʔઌͷϑΝΠϧ໊ΛਘͶΔ 5.ϑΝΠϧ͕༗Δ͔Ͳ͏͔νΣοΫ͢Δ 6.ϑΝΠϧ͕༗ΕɺϢʔβʔʹͦΕΛ্ॻ͖͢Δ͔Ͳ͏͔ਘͶΔ 7.ݩϑΝΠϧΛ։͘ 8.ݩϑΝΠϧ͕ۭͩͬͨΒͦΕΛϢʔβʔʹ௨͠ɺϓϩάϥϜΛऴྃ͢Δ 9.ίϐʔઌͷϑΝΠϧΛ։͘
10.σʔλΛίϐʔݩͷϑΝΠϧ͔ΒίϐʔઌͷϑΝΠϧʹίϐʔ͢Δ 11.ݩϑΝΠϧΛด͡Δ 12.ίϐʔઌͷϑΝΠϧΛด͡Δ ࣮ࡍʹίϐʔͯ͠Δͷ ͚ͩ͜͜
UNIXͷcopyίϚϯυ 1.Ϣʔβʔʹίϐʔ͢ΔݩͷϑΝΠϧ໊ΛਘͶΔ 2.ϑΝΠϧ͕༗Δ͔Ͳ͏͔νΣοΫ͢Δ 3.ϑΝΠϧ͕ͳ͚ΕͦΕΛϢʔβʔʹ௨͢Δ 4.ϢʔβʔʹίϐʔઌͷϑΝΠϧ໊ΛਘͶΔ 5.ϑΝΠϧ͕༗Δ͔Ͳ͏͔νΣοΫ͢Δ 6.ϑΝΠϧ͕༗ΕɺϢʔβʔʹͦΕΛ্ॻ͖͢Δ͔Ͳ͏͔ਘͶΔ 7.ݩϑΝΠϧΛ։͘ 8.ݩϑΝΠϧ͕ۭͩͬͨΒͦΕΛϢʔβʔʹ௨͠ɺϓϩάϥϜΛऴྃ͢Δ 9.ίϐʔઌͷϑΝΠϧΛ։͘
10.σʔλΛίϐʔݩͷϑΝΠϧ͔ΒίϐʔઌͷϑΝΠϧʹίϐʔ͢Δ 11.ݩϑΝΠϧΛด͡Δ 12.ίϐʔઌͷϑΝΠϧΛด͡Δ ࣮ࡍͷίϐʔಈ࡞ͱ ଞͷͪΐͬͱͨ͜͠ͱͷΈͷ࣮ ରతΠϯλʔϑΣʔεΛආ͚͍ͯΔ
$ echo `who | awk ‘{print $1}’ | sort |
uniq ` | sed ’s/ /, /g’ 6ͭͷίϚϯυ ߦ FDIP XIP BXL TPSU VOJR TFE ߹ܭ ύΠϓ( | )ʹΑͬͯ ෳͷϓϩάϥϜ͕ ͏·͘࿈ܞ͢Δ ιϑτΣΞͷᑏࢠΛར༻͢Δ ɾͦΕͧΕ͕ϑΟϧλͱͯ͠ಈ࡞
• ΈʹԠͯࣗ͡ͰڥΛௐઅͰ͖ΔΑ͏ʹ͢Δ • OSͷΧʔωϧΛখܰ͘͘͢͞Δ • খจࣈΛ͍ɺ͘͢Δ • ྛΛकΔ • ۚ
• ಉ࣌ʹߟ͑Δ • ෦ͷ૯શମΑΓେ͖͍ • 90%ͷղΛࢦ͢ • ྼΔ΄͏͕༏Ε͍ͯΔɻ • ֊తʹߟ͑Δ ͦͷଞখఆཧ
lsʢUNIXʣͱdirʢMS-DOSʣ $ ls $ > dir DIRECTORY: NO FILES FOUND
> Կͳ͍σΟϨΫτϦͷதͰͦΕͧΕͷίϚϯυΛଧͭͱɾɾɾ ग़ྗ͕ͳ͍ = ϑΝΠϧ͕ͳ͍ ਓ͕ݟͯϑΝΠϧ͕ͳ͍͜ͱΘ͔Δ͕ ύΠϓ͢Δͱ͖ʁ ଞͷϓϩάϥϜͱҰॹʹ͏ʹʁ
ͦͷଞಡΜͰ͍ͯ໘ന͍ͱ͜Ζ • UNIXͷྺ࢙ • Multicsͱ͍͏OSʹର߅໊ͨ͠લΒ͍͠ • ଞͷOSͱͷҧ͍ • Atari, MS-DOS,
OpenVMS
͜ͷຊΛಡΜ্ͩͰikuwow͕ ߟ͑ΔUNIXͷૉΒ͠͞ • ਓؒͱػցͷதؒͰ࠷ߴʹύϫϑϧͰޓ ੑͷߴ͍γεςϜ • ͭ·ΓιϑτΣΞͱͯ͠ͷཧܗ • ࣄ࣮WindowsҎ֎ͷશͯͷOS͕͜ͷOSͷܥ ේͱ࣮ͯ͠ࡍʹੈքͰར༻͞Ε͍ͯΔ
Α͋͘ΔֶॻͱൺΔͱ Lisp͕͖ͳਓͷϒϩά Έ͍ͨͳຊ ࣗΒͷٕज़ΛߴΊͳ͕Β ιϑτΣΞ։ൃऀͱͯ͠ ͤʹੜ͖Δ UNIXͱ͍͏࠷ͷ ߴ͍ιϑτΣΞͷҰ͔ͭΒ ʮΑ͍ϓϩάϥϜʯͱԿ͔ΛֶΔ ͬͱ۩ମతͰ࣮༻తͳֶ͕هड़͞Ε͍ͯΔ
ֶ͕ࣗΜͩ͜ͱ • ֶੜͷࣗ ʮ͖ͳϓϩάϥϛϯάݴޠγΣϧεΫϦ ϓτͰ͢ʯ • ʮޮΑΓҠ২ੑʯ <= ʂʂ •
Ҡ২ੑ͕ߴͯ͘ޮ͕ѱ͘ͳ͍ϓϩάϥϜΛ ॻ͘ͷຊʹ͍͠
୭͕ಡΉͱ͍͍ͷ͔ • ιϑτΣΞΛੜۀʹ͍ͯ͠Δ͋ΒΏΔਓ • UNIXʹ͍ͭͯઃܭࢥͳͲͷࠜຊ͔ΒΓͨ ͍ਓ • ৗతʹLinuxͷUnixͷܥේΛड͚ܧ͍ͩ OSΛར༻͍ͯ͠Δਓ
·ͱΊ • UNIXϢʔβʔ͕ԿΛ͍ͯ͠Δ͔Θ͔͍ͬͯ Δ͜ͱΛલఏʹͯ͠ɺ࠷ߴͷόϥϯεͷ্ʹ Γཱ͍ͬͯΔ͜ͱ͕Α͔͘Δຊ • UNIXֶ͔ΒࠓͰʹཱͭϊϋ͕ಘΒ ΕΔͱͯΑ͍ຊ ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠