= Linux =
== リンク ==
* [http://pocketstudio.jp/linux/?FHS Filesystem Hierarchy Standard 日本語訳]
* [http://elinux.org/BeagleBoardUbuntu BeagleBoardUbuntu]
* [http://itpro.nikkeibp.co.jp/article/COLUMN/20071023/285284/?ST=oss はじめてのカーネル・ソース]
* [http://www.ibm.com/developerworks/jp/linux/library/l-dynamic-libraries/index.html Linux 動的ライブラリーの徹底調査]
* [http://www.alsa-project.org/main/index.php/Main_Page Advanced Linux Sound Architecture (ALSA) project homepage]
== メモ ==
* リソースの使用状況を知るには?[[BR]]
{{{
$ ipcs -a
}}}
* どの装置から何回割り込みが入ったかを調べるには?[[BR]]
{{{
$ cat /proc/interrupts
}}}
* インターフェースを管理しているファイルは?[[BR]]
{{{
$ /etc/sysconfig/hwconf
}}}
* ネットワーク環境の状態確認/設定のためのコマンドは?[[BR]]
{{{
$ /sbin/ifconfig
}}}
* パーティションのブロック・サイズを確認するには?[[BR]]
{{{
$ dumpe2fs /dev/sda1
}}}
* あるディレクトリ以下のファイルに対してGREPするには?[[BR]]
GREPオプション[[BR]]
-n: 出力に行番号を付加する[[BR]]
-r: 再帰的に検索を行う[[BR]]
-s: エラー・メッセージを抑止する[[BR]]
{{{
$ grep -nrs <検索語句> <dir名>
}}}
* あるディレクトリ以下のファイルを検索するには?[[BR]]
{{{
$ find <dir名> -name <検索ファイル名>
}}}
* 標準入力の内容を指定ファイルと標準出力の各々に同時に出力するには?
{{{
$ tee [オプション] [ファイル] ...
}}}
* パッケージのビルドに必要なライブラリ等を取得するには?
{{{
$ sudo apt-get build-dep <パッケージ>
}}}
* バイナリファイルをダンプ表示するには?
{{{
$ hexdump -C <ファイル>
}}}
or
{{{
$ hd -C <ファイル>
}}}
* ドライバのコアイベントと、それに対応するudevイベントプロセスを表示するには?[[BR]]
「udevadm monitor」[[BR]]
[http://linux.die.net/man/8/udevadm udevadm(8)][[BR]]
例.USBメモリをアタッチ・デタッチ[[BR]]
{{{
$ udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
KERNEL[1263366899.518234] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6 (usb)
UDEV [1263366899.567351] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6 (usb)
KERNEL[1263366899.568434] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0 (usb)
UDEV [1263366899.603844] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0 (usb)
KERNEL[1263366899.607956] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host5 (scsi)
KERNEL[1263366899.608192] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host5/scsi_host/host5 (scsi_host)
UDEV [1263366899.610571] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host5 (scsi)
KERNEL[1263366899.631687] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/usb_endpoint/usbdev1.5_ep81 (usb_endpoint)
KERNEL[1263366899.632458] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/usb_endpoint/usbdev1.5_ep02 (usb_endpoint)
KERNEL[1263366899.633384] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/usb_endpoint/usbdev1.5_ep00 (usb_endpoint)
UDEV [1263366899.657462] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host5/scsi_host/host5 (scsi_host)
UDEV [1263366899.670121] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/usb_endpoint/usbdev1.5_ep81 (usb_endpoint)
UDEV [1263366899.699881] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/usb_endpoint/usbdev1.5_ep02 (usb_endpoint)
UDEV [1263366899.738660] add /devices/pci0000:00/0000:00:1d.7/usb1/1-6/usb_endpoint/usbdev1.5_ep00 (usb_endpoint)
KERNEL[1263366902.179038] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/usb_endpoint/usbdev1.5_ep81 (usb_endpoint)
UDEV [1263366902.182526] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/usb_endpoint/usbdev1.5_ep81 (usb_endpoint)
KERNEL[1263366902.183760] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/usb_endpoint/usbdev1.5_ep02 (usb_endpoint)
KERNEL[1263366902.184394] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host5/scsi_host/host5 (scsi_host)
KERNEL[1263366902.184846] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host5 (scsi)
KERNEL[1263366902.185383] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0 (usb)
KERNEL[1263366902.185938] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/usb_endpoint/usbdev1.5_ep00 (usb_endpoint)
KERNEL[1263366902.186596] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6 (usb)
UDEV [1263366902.199284] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/usb_endpoint/usbdev1.5_ep02 (usb_endpoint)
UDEV [1263366902.238790] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host5/scsi_host/host5 (scsi_host)
UDEV [1263366902.254701] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host5 (scsi)
UDEV [1263366902.293155] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0 (usb)
UDEV [1263366902.296864] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6/usb_endpoint/usbdev1.5_ep00 (usb_endpoint)
UDEV [1263366902.320776] remove /devices/pci0000:00/0000:00:1d.7/usb1/1-6 (usb)
}}}
== Bluetooth関連コマンド ==
* hcitool (/usr/bin)[[BR]]
'''hcitool''' is used to configure Bluetooth connections and send some special command to Bluetooth devices. If no command is given, or if the option -h is used, hcitool prints some usage information and exits.[[BR]]
ソースは、BlueZ(ex.bluez-4.62.tar.gz)のtoolsディレクトリ内にある。
* hcidump (/usr/sbin)[[BR]]
'''hcidump''' reads raw HCI data coming from and going to a Bluetooth device (which can be specified with the option -i, default is the first available one) and prints to screen commands, events and data in a human-readable form. Optionally, the dump can be written to a file rather than parsed, and the dump file can be parsed in a subsequent moment.[[BR]]
インストールするには?
{{{
$ sudo apt-get install bluez-hcidump
}}}
ソースを取得するには?(カレントディレクトリにダウンロードされる。[http://packages.debian.org/ja/source/sid/bluez-hcidump Debianプロジェクトのページ]にアクセスして取得することも可能。)
{{{
$ sudo apt-get source bluez-hcidump
}}}
* hciconfig (/usr/sbin)[[BR]]
'''hciconfig''' is used to configure Bluetooth devices.
* hciattach (/usr/sbin)[[BR]]
'''hciattach''' is used to attach a serial UART to the Bluetooth stack as HCI transport interface.
* sdptool (/usr/bin)[[BR]]
'''sdptool''' provides the interface for performing SDP queries on Bluetooth devices, and administering a local sdpd.
* rfcomm (/usr/bin)[[BR]]
'''rfcomm''' is used to set up, maintain, and inspect the RFCOMM configuration of the Bluetooth subsystem in the Linux kernel. If no command is given, or if the option -a is used, rfcomm prints information about the configured RFCOMM devices.
* bluetooth-analyzer (/usr/bin)[[BR]]
Display Bluetooth protocol traces in Frontline BTSnoop and Apple Packet Logger format.
* bluetooth-browse (/usr/bin)[[BR]]
Display a dialog for browsing directories over Bluetooth.
* bluetooth-sendto (/usr/bin)[[BR]]
Display a dialog for transfering files over Bluetooth.
* bluetooth-applet (/usr/bin)[[BR]]
Stay in your GNOME panel as a Bluetooth icon and will pop up a dialog whenever a passkey (aka PIN) is required from the Linux Bluetooth stack.
* bluetooth-properties (/usr/bin)[[BR]]
Display a dialog for changing Bluetooth preferences.
* bluetooth-wizard (/usr/bin)[[BR]]
Display a wizard for setting up Bluetooth devices.
== USB関連コマンド ==
* lsusb (/usr/sbin or /sbin)[[BR]]
'''lsusb''' is a utility for displaying information about USB buses in the system and the devices connected to them.
最終更新:2010年07月30日 16:08