Category: Linux tips
Posted by: hajime osako
RPM%u306B%u3088%u308B%u30D1%u30C3%u30B1%u30FC%u30B8%u7BA1%u7406%u3092%u7406%u89E3%u3059%u308B %uFF0D %uFF20IT%u81EA%u5206%u6226%u7565%u7814%u7A76%u6240

RPM data is stored under /var/lib/rpm as Berkeley DB file

rm /var/lib/rpm/__db.* ; rpm --rebuilddb

Using RPM to Verify Installed Packages

rpm -Va for all
or
rpm -Vp /mnt/cdrom/RedHat/RPMS/i386/adduser-1.1-1.i386.rpm


Category: Linux tips
Posted by: hajime osako
A type appended text append after the line
y for copy and p for paste
To repeat a motion prepend it with a number: 2w
To move to the start of the line use a zero: 0
CTRL-G displays your location in the file and the file status.
G moves to the end of the file.
gg moves to the first line.
Typing ? followed by a phrase searches BACKWARD for the phrase.
N to search in the opposite direction.
CTRL-O takes you back to older positions, CTRL-I to newer positions.
CTRL-W CTRL-W to switch current window
CTRL-W c to close crrent window, more infor :help windows
Typing % while the cursor is on a (,),[,],{, or } goes to its match.
To ask for confirmation each time add 'c' :%s/old/new/gc
:!command executes an external command.
v motion :w FILENAME saves the Visually selected lines in file FILENAME.
Ctrl-v^jjjI#[space][esc]
:r FILENAME retrieves disk file FILENAME and puts it below the cursor position.
CTRL-n or CTRL-p in insert mode is for auto-complete.
more infor :help ins-completion
Category: Linux tips
Posted by: hajime osako

01/16: Linux > iconv

Category: Linux tips
Posted by: hajime osako
%u4E2D%u56FD%u8A9E%u306E%u6587%u5B57%u30B3%u30FC%u30C9

iconv -f GB2312 -t UTF-8 /root/hajime/GB2312.txt

01/05: Linux > RPM

Category: Linux tips
Posted by: hajime osako
RPMパッケージからファイルを取り出すには

rpm2cpio | cpio to get the rpm package contents.
Category: Linux tips
Posted by: hajime osako
Category: Linux tips
Posted by: hajime osako
ログ情報の採取方法

SYSLOGFILE="/var/adm/syslog/syslog.log":HP-UXのOSの場合
SYSLOGFILE="/var/adm/messages":Solarisの場合
SYSLOGFILE="/var/adm/syslog":AIXの場合
SYSLOGFILE="/var/log/messages*":Linuxの場合
Category: Linux tips
Posted by: hajime osako
nfs が umount できなかった。kill できないプロセスができちゃった。

[root@dev000 root]# cat /proc/19242/status
Name: df
State: D (disk sleep)

12/10: Using rpm -K

Category: Linux tips
Posted by: hajime osako
Using rpm -K

rpm -Kv xxxxx.rpm
Category: Linux tips
Posted by: hajime osako