app1.id



Similar documents

情報の分析 1. Linux ツールの活用

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2

unix.dvi

UNIX

273? C

untitled

本 日 の 授 業 内 容 最 低 限 覚 えるべきUNIXコマンド pwd, ls, mkdir, cd, cp, rm, mv テキストエディタの 簡 単 な 使 い 方 テキストエディット, Jedit X,Emacs C 言 語 プログラミングの 初 歩 hello, world を 画 面

A

kiso2-01.key

GNU Emacs GNU Emacs

UNIX

tebiki00.dvi

1) : man [ ] 1: $ man ls ls ( jman) 2: $ man 3 printf C printf 3 man 1: 2: UNIX 3: 4: 5: 6: 7: 8: man man man -k 2) : ls [options] 1: $ ls /etc [ or ]

ファイルシステム

UNIX version Copyright c Daikoku Manabu 1 UNIX 1.1 UNIX UNIX UNIX OS Windows UNIX UNIX UN

スパコンに通じる並列プログラミングの基礎

X Window System X X &

LAN Copyright c Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License

( ) Shift JIS ( ) ASCII ASCII ( ) 8bit = 1 Byte JIS(Japan Industrial Standard) X 0201 (X ) 2 Byte JIS ISO-2022-JP, Shift JIS, EUC 1 Byte 2 By


CentOSv2_furoku

dynabookガイド

bash on Ubuntu on Windows bash on Ubuntu on Windows bash on Ubuntu on Windows bash on Ubuntu on Windows bash on Ubuntu on Windows ˆ Windows10 64bit Wi

untitled

kiso2-01.key

Microsoft PowerPoint - スハ?コン利用入門_ _UNIX利用の基礎知識.pptx

<4D F736F F F696E74202D E3F FC96E55F F554E CC8AEE D8EAF2E B8CDD8AB B83685D>

PowerPoint Presentation

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè11²ó

スパコンに通じる並列プログラミングの基礎

スパコンに通じる並列プログラミングの基礎

170420_unix.pptx

¥ƥ­¥¹¥ȥ¨¥ǥ£¥¿¤λȤ¤˽

( ) 1 Windows HTML ( ) ( ) ( ) WWW 10 ( )

橡J_ptvr_common.PDF

CMS入門

PowerPoint Presentation

160420c_unix.pptx

Microsoft PowerPoint - InfPro_I6.pptx

I #2 : ( 8-13), () URL : j inoue/prog2007/prog2007.html

-2 gnuplot( ) j ( ) gnuplot /shell/myscript 1

オンラインマニュアル

情報処理概論(第二日目)

( )!?

(2 Linux Mozilla [ ] [ ] [ ] [ ] URL 2 qkc, nkc ~/.cshrc (emacs 2 set path=($path /usr/meiji/pub/linux/bin tcsh b

dynabookガイド

スライド 1

橡マニュアル1999.PDF

UNIX とは? 1969 年 米国のベル研究所で開発されたオペレーティングシステム特徴 文字ベースの対話型 OS マルチユーザ 複数のユーザが同時に利用できる マルチタスク マルチプロセス 複数の処理を平行して行える タイムシェアリング 一定の時間に区切って処理を行う 複数の処理を平行しているよう

リファレンス

TC5.ids

Microsoft Word - マニュアル4.1J

情報処理概論(第二日目)

2 1. Ubuntu 1.1 OS OS OS ( OS ) OS ( OS ) VMware Player VMware Player jp/download/player/ URL VMware Plaeyr VMware

情報処理概論(第二日目)

dynabookガイド

note.dvi

第 3 回情報基礎演習 UNIX / Linux: ファイルシステム シェルを理解しよう! 谷口貴志 Panda に login し 情報基礎演習クラスの VDI から Ubuntu に接続し Linux に login した後, 左 上の Activity 端末のアイオン をクリック 端末 を立ち

スライド 1

PowerPoint Presentation

index.dvi

Microsoft Word - FreeBSD

i

XEN 仮想マシンの移植 Islandcenter.jp 2009/04/14 既に作成済みの XEN 仮想マシンを移植する方法を説明します 仮想マシンイメージは 通常 /var/lib/xen/image/myvmachine に作成されていますが このファイルを tar 圧縮してリムーバブルメデ

syspro-0405.ppt


Taro-cshプログラミングの応用.jt

PowerPoint プレゼンテーション - 物理学情報処理演習

Linux 利用の手引き ( 基本編 ) Linux 手引き ( 基本編 )-1 総合情報センター 2018 年 3 月版 総合情報センター 1 概要 Linux システム Linux 起動 サインイン Gnome ウインドウ メニュー操作

Raspberry Pi ZeroによるIoT入門

Linux XScreenSaver T020074

2008 Linux May 12, 2008

2 Windows 10 *1 3 Linux 3.1 Windows Bash on Ubuntu on Windows cygwin MacOS Linux OS Ubuntu OS Linux OS 1 GUI Windows Explorer Mac Finder 1 GUI

はじめに

untitled

練習 4 ディレクトリにあるファイルを直接指定する (cat) cat コマンドを使う (% cat ファイル名 ) と ファイルの内容を表示できた ファイル名のところにパス名を使い ディレクトリ名 / ファイル名 のように指定すると ディレクトリ内にあるファイルを直接指定できる 1 % cat _

Unix * 3 PC 2 Linux, Mac *4 Windows Cygwin Cygwin gnuplot Cygwin unix emulator online gnuplot *5 matplotlib *6 SuperMongo *7 gnuplot gnuplot OS *8 Uni

インターネット入門

XFree XFree86 2. Kterm 3. Canna 4. Vi Vi VIM 5. Emacs Emacs 21 XEmacs XFree Mac OS X XDarwin Aqua XFree ( X L


c a a ca c c% c11 c12 % s & %

図 1: 場所をクリックし ホームフォルダーをクリックすると (上図) ホーム フォルダー下にあるファイルやディレクトリの一覧を見ることができる 下図 2

WebOS aplat WebOS WebOS 3 XML Yahoo!Pipes Popfry UNIX grep awk XML GUI WebOS GUI GUI 4 CUI

リファレンス

MYWORDⅤ Pro 操作マニュアル

Microsoft Word - C.....u.K...doc

1 ログインとログアウト 1.1 ログイン ログイン画面で [ password ] 欄にパスワードを入力します (図 1) 図 1 ログイン画面 正しくログインができると Ubuntu のデスクトップ画面 図2 が表示されます 図2 Ubuntu デスクトップ画面 2

VNX for Fileでの監査ツールの構成および使用


Linux サーバー構築 LINUX サーバー構築目次... 1 第 1 章 LINUX のインストール... 6 第 1 節 CentOS とは... 6 第 1 項 CentOS とは... 6 第 2 節 CentOS インストールの準備... 6 第 1 項 iso ファイルの入手... 6

book

B 20 Web

ネットワークシステム管理 #01

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

プログラミング演習Ⅱ ガイダンス

ネットワークシステム管理 #01

Microsoft PowerPoint - 遺伝統計学夏の学校2018_Linux入門.pptx

K-BASIC 1st: ユニケージ基礎編(前編)

slice00_install.dvi

Transcription:

4 4.1 4.1.1 Linux ARMA 3.0 on cosmos tty1 cosmos login: kdm kdm ctrl+alt+f1 login: Enter EnterLinux cosmos login: junko password: Last login: Wed Aug 14 14:14:14 2009 on tty2 $ Linux $ exit Enter prompt :, $ exit exit ARMA 3.0 on cosmos tty1 cosmos login: 1

4.1.2 Linux Linux OS ARMA tree / -+- bin +- home -+- harumi -+- hoge1.txt +- hoge2.txt +- junko --+- hoge3.txt +- hoge4.txt ( 略 ) ( 略 ) root : Linux / 1 / / home harumi hoge1.txt / /home/harumi/hoge1.txt /. 1.. /home/harumi hoge1.txt./hoge1.txt hoge3.txt../junko/hoge3.txt Linux /home/<ユーザ 名 > harumi 2

/home/harumi 4.1.3 Linux 4.1.4 ls ls ls $ ls [< オプション >] [< ファイル ( 複 数 可 )>] ls $ ls hoge1.txt hoge2.txt ls -a. -d -l -R -F / * -t -S -r -r -t -r -S --color -a $ ls -a....bash_history.bash_profile.bashrc hoge1.txt hoge2.txt Linux..... 3

-d ls -d $ ls /home/harumi hoge1.txt hoge2.txt $ ls -d /home/harumi harumi -l chmod $ ls -l /home/harumi -rw-r--r-- 1 harumi users 1234 2009-03-04 05:06 hoge1.txt -rw-r--r-- 1 harumi users 8765 2009-04-06 08:10 hoge2.txt --color Linux 4.1.5 cd,pwd cd $ cd [< ディレクトリ >] pwd $ pwd pwd cosmos:/home/junko$ 4

4.1.6 cp,mv,rm cpmvrm cp $ cp [< オプション >] < コピー 元 ( 複 数 可 )> < コピー 先 > cp -i -d -p -R -a -dpr mv $ mv [< オプション > < 移 動 元 ( 複 数 可 )> < 移 動 先 > mv -i rm rm Enter $ rm [< オプション >] < ファイル ( 複 数 可 )> -i -f -r 5

4.1.7 mkdir,rmdir mkdir, rmdirrmdir rm -r $ mkdir [< オプション >] < ディレクトリ ( 複 数 可 )> $ rmdir [< オプション >] < ディレクトリ ( 複 数 可 )> mkdir, rmdir -p -p mkdir, rmdir 2 1 -p dir1/dir2 -p $ mkdir dir1 $ mkdir dir1/dir2 $ rmdir dir1/dir2 $ rmdir dir1 $ mkdir -p dir1/dir2 $ rmdir -p dir1/dir2 4.1.8 Linux 1 11 Linux 3 ls -l -rw-r--r-- 1 harumi users 1234 2009-03-04 05:06 hoge1.txt harumi users -rw-r--r-- 1 9 9 6

3 3 rwx r,w,x - hoge1.txt 3 rw- = 3 r-- = 3 r-- = r w x x w -rw-r--r-- 1 - d l b c p setuid, setgid root setuid root ls -l setuid -rwsr-xr-xsetgid -rwxr-sr-xs x setuid s S setgid root setuid 7

sticky /tmp sticky sticky ls -l -rwxrwxrwtt x sticky setuid, setgid T 4.1.9 chown,chgrp chown w $ chown [-R] < ユーザ >[:< グループ >] < ファイル ( 複 数 可 )> -R chown : chgrp $ chgrp [-R] < グループ > < ファイル ( 複 数 可 )> -R chown 4.1.10 chmod chmod $ chmod < 対 象 ( 複 数 可 )>{+ - =}< 権 限 ( 複 数 可 )> < ファイル ( 複 数 可 )> ug u g o a ugo +,-,= + - 8

= r,w,x,s,t rw $ chmod u-w file1 ( 所 有 者 がファイルに 書 き 込 めないよう にする ) $ chmod u+s file2 (setuid を 立 てる ) $ chmod u=rwx go=rx file3 ( ファイルのパーミッションを 設 定 し 直 す ) chmod $ chmod < パーミッション > < ファイル ( 複 数 可 )> rwxrwxrwx 400,200,100,40,20,10,4, 2,1 setuid, setgid, sticky 4000,2000,1000 rwsr-xr-x 4000+400+200+100+40+10+4+1 = 4755rw-r- -r-- 400+200+40+4 = 644 4.2 Linux Linux Linux OSOS OS OS OS ARMA Linux OS ARMA Linux 4.2.1 ARMA / OGL = bash ARMA bash bash bash = Bourne Again SHell GNU Steven Bourne UNIX sh bash sh = B ARMA csh = C tcsh 9

4.2.2 bash Enter Ctrl+a Ctrla Ctrl+a, Ctrl+e Ctrl+b, Ctrl+f Alt+b, Alt+f Ctrl+d Ctrl+h Ctrl+k Ctrl+p, Ctrl+n Ctrl+r / 1 /, 1 / 1 Del 1 Backspace 1 /, Ctrl+r Ctrl+r Enter $ Ctrl+r cp (reverse-i-search)`cp': cp hoge1.txt /tmp 10

4.2.3 bash Tab dpkg-buildpackage dpkg-b Tab dpkg-b dpkg-buildpackage uildpackage $ dpkg-b Tab $ dpkg-buildpackge bash dpkg Tab Tab dpkg $ dpkg TabTab $ dpkg dpkg dpkg-genchanges dpkg-scansources dpkg-architecture dpkg-gencontrol dpkg-shlibdeps dpkg-buildpackage dpkg-name dpkg-source dpkg-checkbuilddeps dpkg-parsechangelog dpkg-split dpkg-deb dpkg-preconfigure dpkg-statoverride dpkg-distaddfile dpkg-reconfigure dpkg-divert dpkg-scanpackages $ dpkg Tab 11

4.2.4 bash? 1 * 0 1 100 1001? 10 1* 1 $ ls 1? 10 11 12 13 14 15 16 17 18 19 $ ls 1* 1 10 11 12 13 14 15 16 17 18 19 100 ~<ユーザ 名 > ~harumi harumi /home/harumi ~ 4.2.5 Linux bash < > ls result $ ls > result $ cat result hoge1.txt hoge2.txt 12

4.2.6 ls grep foo $ ls grep foo 4.2.7 ; 1 /tmp ls $ cd /tmp ; ls 4.2.8 ` pwd ls $ ls `pwd` hoge1.txt hoge2.txt ls 4.2.9 > a > test $ echo a > test $ cat test a $ echo a > test a > test 13

4.2.10 ' a > test > $ echo 'a > test' a > text 4.2.11 EDITOR LANG PAGER PATH LANG C ja_jp.eucjp export $ export [< 変 数 名 >=< 値 >] 4.2.12 bash bash 3 man bash ~/.bash_profile ~/.bashrc ~/.bash_logout bash 14

4.3 4.3.1 UNIX UNIX /etc /usr/share /var/log UNIX TeXUNIX UNIX UNIX 4.3.2 lv, less / jless lv $ lv < ファイル ( 複 数 可 )> gnome-terminal f,b / PageDown,PageUp u,d /, k,j / vi >,< / /,? / n,n / :n,:p / = q lv >,< 300> 300 15

man 7 regex * /,? Enter less jless lv lv ARMA lv lv less lv less 4.3.3 head,tail head, tail lv $ head [-c < バイト 数 > -n < 行 数 >] [< ファイル >] $ tail [-c < バイト 数 > -n < 行 数 >] [-f] [< ファイル >] 10 -c k,m KB,MB -n tail -f # tail -f /var/log/messages 4.3.4 grep, zgrep, bzgrep, lgrep grep sed g / RE / pre = Regular Expression = grep $ grep [< オプション >] < 正 規 表 現 > [< ファイル ( 複 数 可 )>] -A <n> n -B <n> n -C <n> n -v 16

-i -H, -h / -n -r zgrep, bzgrep gzip, bzip2 grep *.gz *.bz2 lgrep lv grep -v, -n 4.3.5 sort sort ASCII A Z, a z sort ABC sort $ sort [< オプション >] [< ファイル ( 複 数 可 )>] ABC -b -f -n,-g -g -r -k <m>[,<n>] m n -n 0 9 $ cat n_sort 100 20 $ sort n_sort 100 20 $ sort -n n_sort 20 17

100 100 20 1 2 100 20 100 20 20 100 -g -f 1.23e45 +6.78 -n -k $ cat k_sort 2 100 1 3 3 20 $ cat -k1,1 k_sort 1 3 2 100 3 20 $ cat -k2,2 k_sort 2 100 3 20 1 3 $ cat -k2n,2 k_sort 1 3 3 20 2 100 -k1,1 1 -k2,2 2 -k2n,2 n 1 2 3 -k1.2,1.3 18

4.3.6 uniq uniq 2 3 1 uniq sort $ uniq [< オプション >] [< ファイル >] -f <n> n uniq -s <m> m uniq -i -c -u 1 -d 2 1 sort -f,-s n m uniq 4.3.7 wc wc 1 1 1 2 UTF ISO-2022-JP wc ``This is a pen.'' wc $ wc [< オプション >] [< ファイル >] -c -w -l -L -L 1 19

4.3.8 diff diff 2 $ diff [< オプション >] < ファイル 1> < ファイル 2> 2 -b -w -B -i -r -N -c context -C <n> context n -u unified -U <n> unified n -b ho ge1 ho ge2 -w hoge 0 -N -r dir1/x-file dir2/x-file $ diff -r dir1 dir2 Only in dir1/: x-file $ diff -rn dir1 dir2 diff -rn dir1/x-file dir2/x-file 1c1 < This is dir1/x-file. -N dir2/x-file diff 2 diff context, unified 20

$ cat hoge1 1 行 目 2 行 目 (hoge1 の 2 行 目 ) 3 行 目 $ cat hoge2 1 行 目 2 行 目 (hoge2 の 2 行 目 ) 3 行 目 4 行 目 $ diff hoge1 hoge2 2c2 < 2 行 目 (hoge1 の 2 行 目 ) --- > 2 行 目 (hoge2 の 2 行 目 ) 3a4 > 4 行 目 2c2 hoge1 2 hoge2 2 < hoge1 > hoge2 context diff patch $ diff -c hoge1 hoge2 *** hoge1 Mon Jun 25 17:00:08 2001 --- hoge2 Mon Jun 25 16:59:59 2001 *************** *** 1,3 **** 1 行 目! 2 行 目 (hoge1 の 2 行 目 ) 3 行 目 --- 1,4 ---- 1 行 目! 2 行 目 (hoge2 の 2 行 目 ) 3 行 目 + 4 行 目 21

- file1 *** hoge1 --- hoge2 *** 1,3 **** hoge1 1 3! + file2 - + diff hoge1 hoge2 -+ unified context 2 $ diff -u hoge1 hoge2 --- hoge1 Mon Jun 25 17:00:08 2001 +++ hoge2 Mon Jun 25 16:59:59 2001 @@ -1,3 +1,4 @@ 1 行 目 -2 行 目 (hoge1 の 2 行 目 ) +2 行 目 (hoge2 の 2 行 目 ) 3 行 目 +4 行 目 @@ -1,3 +1,4 @@ file1 1 3 file2 1 4 - + context 4.3.9 lv, nkf ISO-2022-JP, EUC-JP, ShiftJIS 3 UNIX Windows ARMA 3 lv $ lv [-k] [-I< 変 換 前 文 字 コード >] -O< 変 換 後 文 字 コード > < ファイル > -I -O -I ej j s l1 ~ l9 u7 u8 EUC-JP EUC ISO-2022-JPJIS Shift JISMicrosoft ISO-8859-1 ISO8859-9 UTF-7 UTF-8 22

-k JISX0201 JISX0208 lv nkf $ nkf [{-e} {-j} {-s}] [< ファイル >] -e, -j, -s EUC-JP, ISO-2022-JP, Shift JIS 4.4 4.4.1 vi vi vi vi vi vi $ vi < ファイル > vi vi ~ ~ ~ ~ ~ hoge.txt: new file: line 1 vi ex vi 23

vi ex Esc Esc i -INSERT- ~ ~ ~ ~ ~ -- INSERT -- Esc vi Ctrl+d Ctrl d h, j, k, l / / /,,, 0, $ / 24

ng, m Ctrl+u, Ctrl+d Ctrl+f, Ctrl+b n / m n,m / 1 / vi x X dd yy p P u ZZ vi ex /: / : bash $ ex / Enter nn viex: q! vi w q vi 25

4.4.2 Emacs Emacs Emacs GNU Emacs XEmacs Mule ARMA Emacs Emacs Emacs Emacs Emacs Emacs Emacs Lisp Emacs Lisp WWW Emacs Emacs Emacs Emacs $ emacs [-nw] [< ファイル ( 複 数 可 )>] Emacs GUI CUI X Window System emacs GUI -nw CUI X Window System Emacs Emacs Ctrl C- Alt M- 26

M-xAltx EmacsEnter CtrlAlt C-g C-g 1 Quit C-g 1 C-x u 2 Ctrl+Space Shift+Space C-b C-f M-b M-f C-a C-e C-p C-n C-v M-v M-textless M-textgreater 1 1 1 1 1 1 1 1 C-h C-h del bs C-k 1 C-d 1 Emacs C-space C-w M-w C-y or 27

C-space C-w M-w C-y / C-s I-search: -E:%% *GNU Emacs* ALL L1 (Fundamental Isearch) ------ I-search: 1 C-s Enter M-% -E:%% *GNU Emacs* ALL L1 (Fundamental Isearch) ------ Query replace: Enter -E:%% *GNU Emacs* ALL L1 (Fundamental Isearch) ------ Query replace: windows with: ogl Enter 4 yn q! C-s C-r M-% Emacs Emacs 28

C-x C-b C-x b C-x k C-x 2 C-x 1 C-x o 1 Emacs C-x C-c C-x C-f C-x C-s C-x C-w Emacs 4.5 4.5.1 Linux MUAMail User Agent MTAMail Transfer Agent Mailer MUA MUA 3 MUA MUA 1Maildir : MH MH ~/Maildir 2mbox : ~/mbox 1 3MH : 1 ~/Mail 1 29

4.5.2 fetchmail + procmail MUA MUA MUA fetchmail procmail Maildir fetchmail procmail $ maildirmake.dovecot ~/Maildir maildirmake.dovecot dovecot-common courierimap maildirmake.courier fetchmail IMAP,POP3 IMAPimap.omoikane.co.jp foo ******** poll imap.omoikane.co.jp proto IMAP username foo password ******** mda "/usr/bin/procmail" poll protocol POP3 IMAP username password man fetchmail ~/.fetchmailrc $ chmod 710 ~/.fetchmailrc procmail procmail ~/.procmailrc PATH=/bin:/usr/bin:/usr/local/bin MAILDIR=$HOME/Maildir LOGFILE=$MAILDIR/from LOCKFILE=$HOME/.lockmail DEFAULT=$MAILDIR/new DEFAULT MH Maildir mbox fetchmail Maildir 30

4.5.3 mutt mutt MUA MUA SSH mutt mutt MUA POP3 IMAP4 mutt mutt fetchmail procmail fetchmail procmail mutt man mutt mutt ~/.muttrc $ cp /usr/share/doc/mutt/examples/sample.muttrc ~/.muttrc mutt $ mutt mutt 31

d, u / q, x / Enter v / m r, g / f Enter Enter, BackSpace Space, - n / / m EDITOR 32

a T, c, b To / Cc / Bcc: s Subject: y, q / 4.5.4 Sylpheed Sylpheed X Window System MUA MH Sylpheed $ sylpheed MH ~/Mail 33

34

4.6 WWW 4.6.1 IceweaselFirefoxKonqueror WWWWorld Wide Web ARMA WWW IceweaselIcewaselMozilla Firfox WWW WWW Icweasel X Window System Iceweasel Debian Firefox Iceweaesl $ iceweasel & Konqueror KDE - 35

$ konqueror & WWW URLUniform Resource Locator http://www.omoikane.co.jp/ WWW Konqueror WWW 36