すべてを | |
▼開く |
閉じる▲ |
$ ls nmbd.log smbd.log
$ tail *.log ==> nmbd.log <== Netbios nameserver version 3.0.9-1.3E.3 started. Copyright Andrew Tridgell and the Samba Team 1994-2004 [2005/06/02 21:45:32, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(396) ***** Samba name server POLOTXP is now a local master browser for workgroup MYGROUP on subnet 192.168.0.9 ***** [2005/06/02 22:30:30, 0] nmbd/nmbd.c:terminate(56) Got SIGTERM: going down... ==> smbd.log <== [2005/06/02 21:39:42, 0] smbd/server.c:main(760) smbd version 3.0.9-1.3E.3 started. Copyright Andrew Tridgell and the Samba Team 1992-2004 [2005/06/02 21:42:04, 1] smbd/server.c:open_sockets_smbd(348) Reloading services after SIGHUP [2005/06/02 21:42:04, 1] printing/printing.c:start_background_queue(1363) Reloading services after SIGHUP [2005/06/02 21:42:29, 1] smbd/server.c:open_sockets_smbd(348) Reloading services after SIGHUP
tailコマンドで、表示するファイルを「*.log」で指定すると、指定された複数のファイルの末尾10行がそれぞれ表示される。複数ファイルの内容を確認したい場合などに役立つ。
$ tail boot.log Jun 15 12:01:21 polotxp ntpd: ntpd startup succeeded Jun 15 12:03:24 polotxp sendmail: sendmail startup succeeded Jun 15 12:04:24 polotxp sendmail: sm-client startup succeeded Jun 15 12:04:26 polotxp canna: succeeded Jun 15 12:04:26 polotxp crond: crond startup succeeded Jun 15 12:04:27 polotxp xfs: xfs startup succeeded Jun 15 12:04:27 polotxp atd: atd startup succeeded Jun 15 12:04:28 polotxp rhnsd: rhnsd startup succeeded Jun 15 12:04:28 polotxp mdmonitor: mdadm startup succeeded Jun 15 12:04:28 polotxp mdmonitor: mdadm succeeded
tailコマンドで表示するファイル「boot.log」を指示すると、ファイルの最後の10行が表示される。
Copyright iDesign Inc., 2005-2012