Slide 1

Slide 1 text

2023/12/12(Ր) TechTalk #89 uhooi / ઒ޱ ਅԝ ձࣾ PC Ͱ rm -rf ~ ͨ͠࿩

Slide 2

Slide 2 text

΋͘͡ • આ໌ • ܦҢ • Ұ࣌తͳରԠʢαϧϕʔδʣ • ࠶ൃ๷ࢭࡦ • ·ͱΊ

Slide 3

Slide 3 text

આ໌

Slide 4

Slide 4 text

ࢲ͸ձࣾ PC Ͱ rm -rf ~ ͠·ͨ͠ ҹ࡮༻

Slide 5

Slide 5 text

rm -rf ~ ࡟আ͢Δ ࠶ؼ͔ͭ ڧ੍తʹ Ϣʔβʔ σΟϨΫτϦΛ

Slide 6

Slide 6 text

ܦҢ

Slide 7

Slide 7 text

ͳΜ͔͊…ΧϨϯτσΟϨΫτϦ ʹ ~ ͕Ͱ͖ͪΌͬͯ͐…ফͦ͏ͱ ࢥͬͨΒ͊…

Slide 8

Slide 8 text

ϢʔβʔσΟϨΫτϦ ͕ਧ͖ඈΜͰ·ͨ͠🌬

Slide 9

Slide 9 text

ྲྀΕΏ͘࡟আϩάΛݟͨ ॠؒɺޫͷ଎͞Ͱ Ctrl + C Λ ԡͨ͠ϫΠ Ctrl + C: ίϚϯυΛڧ੍ऴྃ͢Δ

Slide 10

Slide 10 text

ح੻తʹඃ֐Λ ࠷খݶʹ཈͑ΒΕͨ

Slide 11

Slide 11 text

ͪͳΈʹɺਖ਼͘͠͸ rm -rf ~ Ͱͳ͘ rm -rf ./~

Slide 12

Slide 12 text

Ұ࣌తͳରԠʢαϧϕʔδʣ

Slide 13

Slide 13 text

׬શʹ࡟আ͞ΕͨϑΝΠϧ ͷαϧϕʔδ͸ෆՄೳ😇

Slide 14

Slide 14 text

ಉ͡ϑΝΠϧΛ৽ͨ ʹੜ੒͢Δ͔͠ͳ͍

Slide 15

Slide 15 text

ϢʔβʔσΟϨΫτϦͷओͳத਎ • Ωϟογϡɹˡ໰୊ͳ͍ • ઃఆϑΝΠϧɹˡͭΒ͍͚Ͳக໋ইͰ͸ͳ͍ • ɹ←̵̶̳͈͊͆ͤ́̓͘;̻̿͜͡

Slide 16

Slide 16 text

Ωϟογϡ • جຊతʹ͸ͳ͚Ε͹ࣗಈੜ੒͞ΕΔͷͰɺؾʹ͠ͳ͍͍ͯ͘

Slide 17

Slide 17 text

ઃఆϑΝΠϧ • dot fi les Λ GitHub ΁্͍͛ͯͨͷͰɺͦΕΛೖΕ௚͢ͷΈ • https://github.com/uhooi/dot fi lesɹˡ🌟͍ͩ͘͞ • Homebrew Ͱ؅ཧ͍ͯͨ͠ CLI πʔϧ͸ɺݸਓ PC Ͱ brew bundle dump Λ࣮ߦ͠ɺձࣾ PC Ͱ brew bundle Λ࣮ߦͯ͠ೖ Ε௚ͨ͠

Slide 18

Slide 18 text

ΞϓϦέʔγϣϯϑΥϧμͳͲ • ح੻తʹੜ͖࢒ͬͨͷͰಛʹԿ΋͍ͯ͠ͳ͍ • ফ͍͑ͯͨΒ͔ͳΓͭΒ͔ͬͨ

Slide 19

Slide 19 text

࠶ൃ๷ࢭࡦ

Slide 20

Slide 20 text

trash-cli

Slide 21

Slide 21 text

ʮtrash-cliʯͱ͸ʁ • ϑΝΠϧ΍σΟϨΫτϦΛΰϛശʢ~/.local/share/Trash/files/ʣ΁Ҡಈ͢Δ CLI πʔϧ • ̑ͭͷίϚϯυ͕༻ҙ͞Ε͍ͯΔ • trash-put: ϑΝΠϧΛΰϛശ΁ೖΕΔ • trash-empty: ΰϛശΛۭʹ͢Δ • trash-list: ΰϛശͷத਎ΛݟΔ • trash-restore: ϑΝΠϧΛΰϛശ͔Βग़͢ • trash-rm: ϑΝΠϧΛΰϛശ͔Β࡟আ͢Δ

Slide 22

Slide 22 text

·ͣ͸ͱʹ͔͘ brew install trash-cli

Slide 23

Slide 23 text

alias rm='trash-put' Ͱɺ࡟আ࣌ʹΰϛശ΁ೖΕ ΔΑ͏ʹ͢Ε͹͓͚ͬʔ🙆 https://github.com/uhooi/dot fi les/commit/05c3b569389b3ccef4abb91f41a2ba5755f98ede

Slide 24

Slide 24 text

ສ͕Ұ rm -rf ~ ͯ͠΋ trash-restore ~ Ͱ ෮ݩͰ͖Δʢ͸ͣʣ

Slide 25

Slide 25 text

͋ͱ͸ఆظతʹ trash-list → trash-empty Λ࣮ߦͯ͠ ༰ྔΛۭ͚Δ

Slide 26

Slide 26 text

ଞͷ࠶ൃ๷ࢭࡦ •alias rm='rm -i' • ຊ౰ʹ࡟আ͢Δ͔֬ೝ͞ΕΔ • Finderʢm a cOSʣ΍ΤΫεϓϩʔϥʢWindowsʣܦ༝Ͱ࡟আ͢Δ • ίϚϯυͰ࡟আ͠ͳ͍

Slide 27

Slide 27 text

·ͱΊ

Slide 28

Slide 28 text

·ͱΊ • rm ίϚϯυΛ࢖͏ͳ • ઃఆϑΝΠϧΛ Git ؅ཧ͢Δͷ͸͍͍ͧ • tr a sh-cli ΋͍͍ͧ

Slide 29

Slide 29 text

ʙҎ্ʙ Α͍͓೥Λ🎍