2016/08/08
vimtutor の日本語テキスト
vimtutorを起動すると英語で表示される場合があります。
$ vmtutor
linuxで日本語環境が設定されていれば、オプションの指定ができます。
$vimtutor ja
$ vmtutor
===============================================================================
= W e l c o m e t o t h e V I M T u t o r - Version 1.7 =
===============================================================================
Vim is a very powerful editor that has many commands, too many to
explain in a tutor such as this. This tutor is designed to describe
enough of the commands that you will be able to easily use Vim as
an all-purpose editor.
The approximate time required to complete the tutor is 25-30 minutes,
depending upon how much time is spent with experimentation.
ATTENTION:
The commands in the lessons will modify the text. Make a copy of this
file to practise on (if you started "vimtutor" this is already a copy).
It is important to remember that this tutor is set up to teach by
use. That means that you need to execute the commands to learn them
properly. If you only read the text, you will forget the commands!
Now, make sure that your Shift-Lock key is NOT depressed and press
the j key enough times to move the cursor so that Lesson 1.1
completely fills the screen.
"/tmp/tutorGZubZG" 970 行, 33257 文字
linuxで日本語環境が設定されていれば、オプションの指定ができます。
$vimtutor ja
===============================================================================
= V I M 教 本 (チュートリアル) へ よ う こ そ - Version 1.7 =
===============================================================================
Vim は、このチュートリアルで説明するには多すぎる程のコマンドを備えた非常
に強力なエディターです。このチュートリアルは、あなたが Vim を万能エディ
ターとして使いこなせるようになるのに十分なコマンドについて説明をするよう
なっています。
チュートリアルを完了するのに必要な時間は、覚えたコマンドを試すのにどれだ
け時間を使うのかにもよりますが、およそ25から30分です。
ATTENTION:
以下の練習用コマンドにはこの文章を変更するものもあります。練習を始める前
にコピーを作成しましょう("vimtutor"したならば、既にコピーされています)。
このチュートリアルが、使うことで覚えられる仕組みになっていることを、心し
ておかなければなりません。正しく学習するにはコマンドを実際に試さなければ
ならないのです。文章を読んだだけならば、きっと忘れてしまいます!。
さぁ、Capsロック(Shift-Lock)キーが押されていないことを確認した後、画面に
レッスン1.1 が全部表示されるところまで、j キーを押してカーソルを移動しま
しょう。
"/tmp/tutorneyCTc" 977 行, 44060 文字
2015/04/11
コマンド編集
bashのコマンド編集で使えるキー
ヒストリー機能を使って以前に実行したコマンドを再利用できます。このとき、一部コマンドを打ち直したいことがあります。bashシェルでは、コマンドラインでの編集が使えます。
コマンドラインでの編集で使えるキー設定はemacsと同じものです。
キーは、メタキーが設定されています。
C- CTRLキー
M- ESCキー(私のPCの場合)
以下、manからの抜粋
移動コマンド
beginning-of-line (C-a)
行の先頭に移動します。
end-of-line (C-e)
行の末尾に移動します。
forward-char (C-f)
1 文字進みます。
backward-char (C-b)
1 文字戻ります。
forward-word (M-f)
次の単語の最後に進みます。単語は英数字 (文字と数字) からなります。
backward-word (M-b)
現在の単語あるいは前の単語の先頭に戻ります。単語は英数字 (文字と
数字) からなります。
clear-screen (C-l)
現在の行を画面の一番上の行に残したまま、画面をクリアします。引き
数を付けると、画面をクリアせずに現在の行を再描画します。
キルとヤンク
kill-line (C-k)
ポイントから行末までのテキストをキルします。
backward-kill-line (C-x Rubout)
現在のカーソル位置から行頭までをキルします。
unix-line-discard (C-u)
ポイントから行頭までをキルします。キルされたテキストはキルリング
(kill-ring) に入ります。
ヒストリー機能を使って以前に実行したコマンドを再利用できます。このとき、一部コマンドを打ち直したいことがあります。bashシェルでは、コマンドラインでの編集が使えます。
コマンドラインでの編集で使えるキー設定はemacsと同じものです。
キーは、メタキーが設定されています。
C- CTRLキー
M- ESCキー(私のPCの場合)
以下、manからの抜粋
移動コマンド
beginning-of-line (C-a)
行の先頭に移動します。
end-of-line (C-e)
行の末尾に移動します。
forward-char (C-f)
1 文字進みます。
backward-char (C-b)
1 文字戻ります。
forward-word (M-f)
次の単語の最後に進みます。単語は英数字 (文字と数字) からなります。
backward-word (M-b)
現在の単語あるいは前の単語の先頭に戻ります。単語は英数字 (文字と
数字) からなります。
clear-screen (C-l)
現在の行を画面の一番上の行に残したまま、画面をクリアします。引き
数を付けると、画面をクリアせずに現在の行を再描画します。
キルとヤンク
kill-line (C-k)
ポイントから行末までのテキストをキルします。
backward-kill-line (C-x Rubout)
現在のカーソル位置から行頭までをキルします。
unix-line-discard (C-u)
ポイントから行頭までをキルします。キルされたテキストはキルリング
(kill-ring) に入ります。
2013/09/12
ln
- ln
- リンクは、シンボリックリンクとハードリンクがあります。
シンボリックリンクは、windowsでエイリアスと同じようなものと言われています。
シンボリックリンクの例
ln -s /home/user/test /tmp/test
2012/08/01
date
- date
- 日付時刻の表示、設定
$ date 2012年 7月 25日 水曜日 14:56:44 JST
日付、時刻の設定は、管理者ユーザで
# date -s "07/26 12:00 2012" 2012年 7月 26日 木曜日 12:00:00 JST
2012/07/31
whatis
- whatis
- マニュアルから情報を表示
$ whatis passwd
passwd (1) - update a user's authentication tokens(s)
passwd (5) - password file
passwd (rpm) - The passwd utility for setting/changing passwords using PAM
passwd [sslpasswd] (1ssl) - compute password hashes
$ man 5 passwd
PASSWD(5) PASSWD(5)
名前
passwd - パスワードファイル
説明
passwd ファイルには各ユーザアカウントの様々な情報が記録されている。書か
れているのは次の通り。
ログイン名
暗号化されたパスワード (無いこともある)
ユーザ ID 番号
グループ ID 番号
ユーザ名またはコメントのフィールド
ユーザのホームディレクトリ
ユーザのコマンドインタプリタ
2012/07/30
free
- free
- メモリの使用状況表示
$ free
total used free shared buffers cached
Mem: 515308 426376 88932 0 38412 335756
-/+ buffers/cache: 52208 463100
Swap: 1048568 0 1048568
2012/07/26
viエディタ、中級編11(ヤンクバッファ2)
- viエディタ、中級編11(ヤンクバッファ2)
- ビジュアルモード
viエディタ、中級編10(置換2)
- viエディタ、中級編10(置換2)
- viエディタで修正をするとき、単語および行の修正をするときのコマンドです。
- cw
- コマンドモードで修正対象の単語にカーソルを合わせます。ここで「cw」と打つと修正対象の単語が削除され、挿入モードになります。挿入モードになったら正しい単語を入力し、最後に「esc」キーを押します。
- c$
- コマンドモードで修正対象の行にカーソルを合わせます。ここで「c$」と打つとカーソル位置から行末まで削除され、挿入モードになります。挿入モードになったら正しい続きの行を入力し、最後に「esc」キーを押します。
日本語の場合、単語の切れ目は判断が難しいですが、プログラムや設定ファイルの場合はこのコマンドが役に立ちます。
2011/10/06
lsmod
- lsmod
- モジュールの情報を表示
# lsmod Module Size Used by autofs4 29253 3 hidp 23105 2 (以下省略)
2011/10/05
modprobe
- modprobe
- Linux カーネルにモジュールを追加または削除
「-i」 モジュールをインストール
「-c」 設定を表示
「-r」 モジュールを削除
$ modprobe -i mod-id
2011/10/04
2011/10/02
init
- init
- ランレベルの変更
- 0
- シャットダウン
- 1
- シングルユーザモード、システムの変更作業など他のユーザがログインしていない環境を作りたいときに使用します
- 2
- ネットワークなしのマルチユーザモード
- 3
- マルチユーザモード、通常はこれで起動しています。
- 4
- 未使用
- 5
- グラフィカルログイン可能なマルチユーザモード、
- 6
- システムの再起動、このモードを指定すると再起動します
# init q
2011/10/01
2011/09/29
reboot
- reboot
- linux osの再起動
# reboot
shutdown コマンドにオプションを付けることで再起動できます。
# shutdown -r
initコマンドでも再起動できます。
# init 6
2011/09/28
w
- w
- ログインユーザのリスト
whoと同様、ログイン中のユーザ一覧を表示
[user@localhost tmp]$ w 09:57:16 up 1 day, 13:52, 1 user, load average: 0.00, 0.00, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user pts/1 win7 09:22 0.00s 0.04s 0.01s w
2011/09/27
GRUB
- grub
- linuxの起動設定
$ man grub
$ info grub File: grub.info, Node: Top, Next: Introduction, Up: (dir) GRUB manual *********** This is the documentation of GNU GRUB, the GRand Unified Bootloader, a flexible and powerful boot loader program for PCs. This edition documents version 0.97. * Menu: * Introduction:: Capturing the spirit of GRUB * Naming convention:: Names of your drives in GRUB * Installation:: Installing GRUB on your drive * Booting:: How to boot different operating systems * Configuration:: Writing your own configuration file * Network:: Downloading OS images from a network * Serial terminal:: Using GRUB via a serial line * Preset Menu:: Embedding a configuration file into GRUB * Security:: Improving the security * Images:: GRUB image files --zz-Info: (grub.info.gz)Top, 38 行 --Top-------------------------------------- Info バージョン 4.8 にようこそ。? で使い方、m でメニュー鬆
- 関連項目
- LILO
2011/09/26
top
- top
- 全画面表示で、現在実行中のプロセスの状況を表示するコマンドです
top - 17:28:40 up 15:54, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 115 total, 2 running, 113 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.3%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1034708k total, 615628k used, 419080k free, 81856k buffers
Swap: 2097144k total, 0k used, 2097144k free, 410856k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 15 0 2160 644 556 S 0.0 0.1 0:00.93 init
2 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
4 root 10 -5 0 0 0 S 0.0 0.0 0:00.04 events/0
(以下省略)
「h」を押すとヘルプが出ます。
各リソースまたは、プロセスの詳細を確認したいときは、画面を切り替えて表示します。
Help for Interactive Commands - procps version 3.2.7
Window 1:Def: Cumulative mode Off. System: Delay 3.0 secs; Secure mode Off.
Z,B Global: 'Z' change color mappings; 'B' disable/enable bold
l,t,m Toggle Summaries: 'l' load avg; 't' task/cpu stats; 'm' mem info
1,I Toggle SMP view: '1' single/separate states; 'I' Irix/Solaris mode
f,o . Fields/Columns: 'f' add or remove; 'o' change display order
F or O . Select sort field
<,> . Move sort field: '<' next col left; '>' next col right
R,H . Toggle: 'R' normal/reverse sort; 'H' show threads
c,i,S . Toggle: 'c' cmd name/line; 'i' idle tasks; 'S' cumulative time
x,y . Toggle highlights: 'x' sort field; 'y' running tasks
z,b . Toggle: 'z' color/mono; 'b' bold/reverse (only if 'x' or 'y')
u . Show specific user only
n or # . Set maximum tasks displayed
k,r Manipulate tasks: 'k' kill; 'r' renice
d or s Set update interval
W Write configuration file
q Quit
( commands shown with '.' require a visible task display window )
Press 'h' or '?' for help with Windows,
any other key to continue
終了するときは、「q」キーを押します。
2011/09/25
tac
- tac
- ファイルを逆向きに表示する
見ての通り、catの逆の動きをするコマンドです。ファイルをcatとは逆に後ろから最初に向かって出力します。
[user@localhost tmp]$ tac tmp.txt zxcv qwer ghijkl abcdef 123456
登録:
投稿 (Atom)