linux

環境設定

bashで端末のロック
[ctrl]+[s]
bachrcに「stty stop undef」を追加するとこの機能を向こうかできる
ロックの解除は[ctrl]+[q]
NICに複数のip addressを設定する
route add -host 192.168.0.2 dev eth0

コマンド

dpkg
dpkg -Lパッケージがインストールしたファイル一覧
yum
yum provides libstdc++.so.5
yum設定
/etc/yum.repo.d/に適当な名前.repoというファイルを作成し、以下のように記述する。
[RHEL5 DVD]
name=RHEL5 DVD
baseurl=file:///mnt/dvd/Server
enabled=1
gpgcheck=0

※baseurlは適当なディレクトリにrpmを配置しcreaterepoコマンドで必要なファイルを作る
vmstat
vmstat
vmstat -d
vmstat -p
zip
zip tmp.zip *.tif
nohup
nohup command

lv
lv -j text iso-2022-jp
lv -ej text euc-jp
lv -u8 text utf-8
lv -s text sjis

svn
svn co プロトコル://url/プロジェクト名
svn ci -m "コメント"
win-コンテキストメニュ
HKEY_CLASSES_ROOT→Directory→shell

 「shell」を右クリックして「新規」−「キー」を選んで「cmd」というキーを作成する。「cmd」を選んだ際に右のペインに表示される「(既定)」をダブルクリックして、値のデータに「表示する名前」と入力する。
 さらに、「cmd」を右クリックし、「新規」−「キー」を選んで「command」というキーを作成する。これを選んだ際に右のペインに表示される「(既定)」をダブルクリックして、値のデータに「cmd.exe /k "cd %l"」と入力する。
win-VMware+fedra core 5
フルスクリーンに
/etc/X11/xorg.conf
Section "Screen"
SubSection "display" Modes に"1280x1024"追加
デフォルトランレベルの変更
/etc/inittabの
id:5:initdefault:5のところを変える
ifcfg-eth0のサンプル
  • static
DEVICE=eth0
BOOTPROTO=none
HWADDR=MACアドレス
ONBOOT=yes
NETWORK=192.168.1.0
NETMASK=255.255.255.0
IPADDR=192.168.1.10
USERCTL=no
  • dhcp
DEVICE=eth0
BOOTPROTO=none
HWADDR=MACアドレス
ONBOOT=yes
ps
ps auxw[hm]
status
D割り込み不可のスリープ状態
R実行可能
Sスリープ中
T停止中またはトレース中
Wスワップアウトしている
Zゾンビプロセス
Nnice値を持つ

NOTE
netstat -natu


top -bd 60
sar
vmstat -S M


update-alternatives --config x-session-manager
update-alternatives --config x-window-manager

mount -t proc /proc proc
mount -t devfs none sys

/etc/re\c3.d/S* 自動
/etc/re\c3.d/K* 手動
chkconf --level 35 サービス名 [on|off] サービスの自動起動のONOFF

Altキー+Controlキー+F1〜 ttyの切り替え
$_直前のコマンドの最後の引数
cd -直前のディレクトリに移動
watch
watch -n 1 command コマンドを1秒ごとに実行

posgresql.conf
tcp true
pg_hda.conf
host all all networkIP subnetwork trust
local all all trust
postgresql
pg_dump -U ユーザ名 -c -d db名 > file名



ユーザーに特定のメッセージを通知する方法
主にシェルを利用することが多いユーザーが多い場合、motdファイルを編集するを編集する。再度,motdファイルを編集するまでは,ログインするたびに表示される。


カレント以下からファイルの検索
find ./* -name pettern

iso image to cd
mkisofs -r -J -b /boot/grub/stage2_eltorito -no-emul-tool -boot-info-table -boot-load-size 4 -o iso_image iso
cdrecord
cdrecord dev=/dev/hdc イメージファイル名
tee
command | tee log log2
command
$ tar zxpvf [.tar.gz または .tgz]
( $ tar zxvf [.tar.gz または .tgz] )

$ tar jxvf [.tar.bz2 または .tbz]
$ gunzip または $ gzip -d .gz
$ bunzip2 または $ bzip2 -d .bz2
$ lha x [.lha または .lzh]
$ unzip [.zip]
$ jar xf [.jar]
make tarball
$tar czpvf [.tar.gz または .tgz] target


grep
grep -l "pattern" * petternを含むファイルの名前
grep -v "pattern" * petternを含まない
grep -n "pattern" * petternの行番号の表示
grep -i "pattern" * petternの大文字小文字を無視
grep -r "pattern" * 再帰的に検索
grep -e "pattern1" -e "pattern2" * pettern1pattern2を含む

grep_pattern

grep "\(hoge\|piyo\)" hogeかpiyoを含む
grep "^a.*" 先頭がaで始まる
grep "^a.\+" 先頭がaと任意の1文字の2文字で始まる

bat
echo off
echo %*
rem php doSQL.php && php DataInsert.php all init_data && php DataInsert.php all csv_data && cd_demo
php doSQL.php && for %%a IN (%*) DO php DataInsert.php all %%a && pause
HDDの吸出し

hddをunmount
dd if=/dev/hda of=hda.img bs=512 conv=noerror,sync
fsck hda.img or fsck -y hda.img
hda.imgをmountする
hogehoge
smartd多くのハードディスクが持っている自己診断機能から情報を得る
unameシステムの情報を表示する
tail -f一定間隔リロードしながらファイルの末尾表示
headファイルの先頭表示

month
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"

/sys,/proc,/dev内は除外し、20分以内に更新があったファイル
find / \( -path '\/sys' -prune -or -path '\/proc' -prune -or -path '\/dev' -prune \) -o -type f -mmin -20 -print

appwiz.cplプログラムの追加と削除
calc電卓
cmdコマンドプロンプト
controlコントロールパネル
excelExcel
hdwwiz.cplハードウェアの追加ウィザード
inetcpl.cplインターネットオプション
logoffログオフ
magnify拡大鏡
mspaint/pbrushペイント
ncpa.cplネットワーク接続
notepadメモ帳
outlookOutlook
powerpntPowerPoint
powercfg.cpl電源オプション
regedit/regedt32レジストリエディタ
sndvol32ボリュームコントロール
taskmgrタスクマネージャー
winmsdシステム情報
winverWindowsバージョン情報
winwordWord
wordpad/writeワードパット
wupdmgrMicrosoft Update
mshtamshta
winキー+dデスクトップの表示
winキー+l
Shift+Delファイル・フォルダ削除

KANAキーロック状態の解除
Altキー+かな/カナキー(スペースの右側)

IMEツールバー→「ツール」→「プロパティ」を選択
「全般」タブ→「入力設定」の「ローマ字入力/かな入力」項目 を、ローマ字入力に設定

このページへのコメント

hrIBJq I truly appreciate this blog post.Really thank you! Will read on...

0
Posted by stunning seo guys 2014年01月23日(木) 12:57:39 返信

DdKVpr Thanks for sharing, this is a fantastic blog.Thanks Again. Much obliged.

0
Posted by seo thing 2013年12月19日(木) 15:47:49 返信

篁ャ鐔鐚常湿障域障蕁障 若 ≪ http://www.fetang.com/

0
Posted by 若 ≪ 2013年08月01日(木) 04:43:27 返信

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

管理人/副管理人のみ編集できます