/l3/users/eb/2009/linux2/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 |
|
#ls -l /proc/1614
ls: cannot access /proc/1614: No such file or directory |
#ls -l /proc/2414
total 0 dr-xr-xr-x 2 root root 0 May 26 11:51 attr -r-------- 1 root root 0 May 26 11:51 auxv -r--r--r-- 1 root root 0 May 26 11:51 cgroup --w------- 1 root root 0 May 26 11:51 clear_refs -r--r--r-- 1 root root 0 May 26 09:30 cmdline -rw-r--r-- 1 root root 0 May 26 11:51 coredump_filter -r--r--r-- 1 root root 0 May 26 11:51 cpuset lrwxrwxrwx 1 root root 0 May 26 11:51 cwd -> /var/spool/cron -r-------- 1 root root 0 May 26 11:51 environ ... -rw-r--r-- 1 root root 0 May 26 11:51 sched -r--r--r-- 1 root root 0 May 26 11:51 sessionid -r--r--r-- 1 root root 0 May 26 11:51 smaps -r-------- 1 root root 0 May 26 11:51 stack -r--r--r-- 1 root root 0 May 26 09:30 stat -r--r--r-- 1 root root 0 May 26 11:51 statm -r--r--r-- 1 root root 0 May 26 09:30 status -r-------- 1 root root 0 May 26 11:51 syscall dr-xr-xr-x 3 root root 0 May 26 11:51 task -r--r--r-- 1 root root 0 May 26 11:51 wchan |
#ps -elf
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 4 S root 1 0 0 80 0 - 532 - 09:27 ? 00:00:01 init [2] 5 S root 2 0 0 75 -5 - 0 - 09:27 ? 00:00:00 [kthreadd] 1 S root 3 2 0 -40 - - 0 - 09:27 ? 00:00:00 [migration/0] 1 S root 4 2 0 75 -5 - 0 - 09:27 ? 00:00:00 [ksoftirqd/0] 5 S root 5 2 0 -40 - - 0 - 09:27 ? 00:00:00 [watchdog/0] 1 S root 6 2 0 -40 - - 0 - 09:27 ? 00:00:00 [migration/1] 1 S root 7 2 0 75 -5 - 0 - 09:27 ? 00:00:00 [ksoftirqd/1] 5 S root 8 2 0 -40 - - 0 - 09:27 ? 00:00:00 [watchdog/1] 1 S root 9 2 0 75 -5 - 0 - 09:27 ? 00:00:00 [cpuset] ... 0 S root 18954 18946 0 80 0 - 447 - 10:38 pts/2 00:00:00 script -f -c bash -q /root/.lilalo//19971216 1 S root 19036 18954 0 80 0 - 448 - 10:38 pts/2 00:00:00 script -f -c bash -q /root/.lilalo//19971216 0 S root 19037 19036 0 80 0 - 1025 - 10:38 pts/3 00:00:00 bash 5 S 106 27929 1 0 80 0 - 1602 - 17:02 ? 00:00:00 /usr/sbin/exim4 -bd -q30m 0 S user 28632 1 0 80 0 - 1746 - 17:25 ? 00:00:00 xterm 0 S user 28636 28632 0 80 0 - 447 - 17:25 pts/12 00:00:00 script -f -c bash -q /home/user/.lilalo//298 1 S user 28689 28636 0 80 0 - 448 - 17:25 pts/12 00:00:00 script -f -c bash -q /home/user/.lilalo//298 0 S user 28690 28689 0 80 0 - 1540 - 17:25 pts/13 00:00:00 bash 0 S user 28733 28690 0 80 0 - 1315 - 17:26 pts/13 00:00:00 ssh root@10.0.35.100 4 R root 28809 18668 0 80 0 - 615 - 17:37 pts/16 00:00:00 ps -elf |
#ps -f
UID PID PPID C STIME TTY TIME CMD root 18668 18667 0 15:44 pts/16 00:00:00 bash root 28817 18668 0 17:38 pts/16 00:00:00 ps -f |
#ps -elf
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 4 S root 1 0 0 80 0 - 532 - 09:27 ? 00:00:01 init [2] 5 S root 2 0 0 75 -5 - 0 - 09:27 ? 00:00:00 [kthreadd] 1 S root 3 2 0 -40 - - 0 - 09:27 ? 00:00:00 [migration/0] 1 S root 4 2 0 75 -5 - 0 - 09:27 ? 00:00:00 [ksoftirqd/0] 5 S root 5 2 0 -40 - - 0 - 09:27 ? 00:00:00 [watchdog/0] 1 S root 6 2 0 -40 - - 0 - 09:27 ? 00:00:00 [migration/1] 1 S root 7 2 0 75 -5 - 0 - 09:27 ? 00:00:00 [ksoftirqd/1] 5 S root 8 2 0 -40 - - 0 - 09:27 ? 00:00:00 [watchdog/1] 1 S root 9 2 0 75 -5 - 0 - 09:27 ? 00:00:00 [cpuset] ... 0 S root 18954 18946 0 80 0 - 447 - 10:38 pts/2 00:00:00 script -f -c bash -q /root/.lilalo//19971216 1 S root 19036 18954 0 80 0 - 448 - 10:38 pts/2 00:00:00 script -f -c bash -q /root/.lilalo//19971216 0 S root 19037 19036 0 80 0 - 1025 - 10:38 pts/3 00:00:00 bash 5 S 106 27929 1 0 80 0 - 1602 - 17:02 ? 00:00:00 /usr/sbin/exim4 -bd -q30m 0 S user 28632 1 0 80 0 - 1746 - 17:25 ? 00:00:00 xterm 0 S user 28636 28632 0 80 0 - 447 - 17:25 pts/12 00:00:00 script -f -c bash -q /home/user/.lilalo//298 1 S user 28689 28636 0 80 0 - 448 - 17:25 pts/12 00:00:00 script -f -c bash -q /home/user/.lilalo//298 0 S user 28690 28689 0 80 0 - 1540 - 17:25 pts/13 00:00:00 bash 0 S user 28733 28690 0 80 0 - 1315 - 17:26 pts/13 00:00:00 ssh root@10.0.35.100 4 R root 28825 18668 0 80 0 - 615 - 17:38 pts/16 00:00:00 ps -elf |
#ps -ef
UID PID PPID C STIME TTY TIME CMD root 1 0 0 09:27 ? 00:00:01 init [2] root 2 0 0 09:27 ? 00:00:00 [kthreadd] root 3 2 0 09:27 ? 00:00:00 [migration/0] root 4 2 0 09:27 ? 00:00:00 [ksoftirqd/0] root 5 2 0 09:27 ? 00:00:00 [watchdog/0] root 6 2 0 09:27 ? 00:00:00 [migration/1] root 7 2 0 09:27 ? 00:00:00 [ksoftirqd/1] root 8 2 0 09:27 ? 00:00:00 [watchdog/1] root 9 2 0 09:27 ? 00:00:00 [cpuset] ... root 18954 18946 0 10:38 pts/2 00:00:00 script -f -c bash -q /root/.lilalo//1997121612526118558-1243323506.scri root 19036 18954 0 10:38 pts/2 00:00:00 script -f -c bash -q /root/.lilalo//1997121612526118558-1243323506.scri root 19037 19036 0 10:38 pts/3 00:00:00 bash 106 27929 1 0 17:02 ? 00:00:00 /usr/sbin/exim4 -bd -q30m user 28632 1 0 17:25 ? 00:00:00 xterm user 28636 28632 0 17:25 pts/12 00:00:00 script -f -c bash -q /home/user/.lilalo//298416179217529750-1243347939. user 28689 28636 0 17:25 pts/12 00:00:00 script -f -c bash -q /home/user/.lilalo//298416179217529750-1243347939. user 28690 28689 0 17:25 pts/13 00:00:00 bash user 28733 28690 0 17:26 pts/13 00:00:00 ssh root@10.0.35.100 root 28833 18668 0 17:38 pts/16 00:00:00 ps -ef |
#ps -ef | grep cron
root 2414 1 0 09:28 ? 00:00:00 /usr/sbin/cron root 28842 18668 0 17:39 pts/16 00:00:00 grep cron |
#pkill -1 cron
|
#nazhali ctr-c
bash: nazhali: command not found |
#nazhali ctr-c
bash: nazhali: command not found |
#ps -ef | grep cron
root 2414 1 0 09:28 ? 00:00:00 /usr/sbin/cron |
#top
top - 17:48:35 up 8:20, 9 users, load average: 0.08, 0.09, 0.17 Tasks: 131 total, 2 running, 129 sleeping, 0 stopped, 0 zombie Cpu(s): 0.3%us, 0.0%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 3107648k total, 900236k used, 2207412k free, 67508k buffers PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Swap: 0k total, 0k used, 0k free, 615916k cached 2818 root 20 0 9640 7620 1496 S 10 0.2 159:00.30 l3-agent 2403 root 20 0 339m 28m 10m S 0 0.9 1:27.30 Xorg 28891 root 20 0 2424 1188 916 R 0 0.0 0:00.03 top 1 root 20 0 2128 716 620 S 0 0.0 0:01.01 init ... 957 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_1 959 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_2 960 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_3 1074 root 15 -5 0 0 0 S 0 0.0 0:00.70 kjournald 1149 root 16 -4 2212 740 524 S 0 0.0 0:00.04 udevd 1727 root 15 -5 0 0 0 S 0 0.0 0:00.00 kpsmoused 1777 root 15 -5 0 0 0 S 0 0.0 0:00.00 hd-audio0 2014 daemon 20 0 1920 504 412 S 0 0.0 0:00.00 portmap 2196 root 20 0 28840 1684 1024 S 0 0.1 0:00.02 rsyslogd 2212 messageb 20 0 2780 1072 764 S 0 0.0 0:00.18 dbus-daemon |
#ionice
none: prio 4 |
#ionice -h
Usage: ionice [OPTIONS] [COMMAND [ARG]...] Sets or gets process io scheduling class and priority. -n Class data (typically 0-7, lower being higher prio) -c Scheduling class 1: realtime, 2: best-effort, 3: idle -p Process pid -h This help page Jens Axboe <axboe@suse.de> (C) 2005 |
#dd if=/dev/hda1 of=/dev/null
dd: opening `/dev/hda1': No such file or directory |
#ionice -h
Usage: ionice [OPTIONS] [COMMAND [ARG]...] Sets or gets process io scheduling class and priority. -n Class data (typically 0-7, lower being higher prio) -c Scheduling class 1: realtime, 2: best-effort, 3: idle -p Process pid -h This help page Jens Axboe <axboe@suse.de> (C) 2005 |
#dd if=/dev/hda1 of=/dev/null &
[1] 28931 dd: opening `/dev/hda1': No such file or directory [1]+ Exit 1 dd if=/dev/hda1 of=/dev/null |
#ionice -n 0 -p 28931
ioprio_set: No such process |
#ionice -h
Usage: ionice [OPTIONS] [COMMAND [ARG]...] Sets or gets process io scheduling class and priority. -n Class data (typically 0-7, lower being higher prio) -c Scheduling class 1: realtime, 2: best-effort, 3: idle -p Process pid -h This help page Jens Axboe <axboe@suse.de> (C) 2005 |
#cat /etc/crontab
# /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # |
$ssh root@10.0.35.100
root@10.0.35.100's password: Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed May 27 09:46:17 2009 from linux4.unix.nt |
#ls -l /etc/cron.monthly/
total 4 -rwxr-xr-x 1 root root 129 May 13 03:13 standard |
$ssh root@10.0.35.100
root@10.0.35.100's password: Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed May 27 10:07:04 2009 from 192.168.15.253 |
#ls -l /etc/cron.daily/
total 32 -rwxr-xr-x 1 root root 7482 Apr 14 15:31 apt -rwxr-xr-x 1 root root 314 Apr 18 00:40 aptitude -rwxr-xr-x 1 root root 502 Nov 20 2007 bsdmainutils -rwxr-xr-x 1 root root 4073 May 10 11:23 exim4-base -rwxr-xr-x 1 root root 89 Jan 18 02:49 logrotate -rwxr-xr-x 1 root root 954 Mar 15 01:34 man-db -rwxr-xr-x 1 root root 3349 May 13 03:13 standard |
#whatis erterert
erterert: nothing appropriate. |
#cat /etc/crontab
# /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # |
#crontab -l
no crontab for root |
#ls -l
total 48 drwxr-xr-x 2 root root 4096 May 26 16:16 BBBB drwxr-xr-x 2 user user 4096 May 25 09:42 Desktop drwxr-xr-x 2 user user 4096 May 25 09:42 Documents drwxr-xr-x 2 user user 4096 May 25 09:42 Download drwxr-xr-x 2 user user 4096 May 25 09:42 Music drwxr-xr-x 2 user user 4096 May 25 09:42 Pictures drwxr-xr-x 2 user user 4096 May 25 09:42 Public drwxr-xr-x 2 user user 4096 May 25 09:42 Templates drwxr-xr-x 2 user user 4096 May 25 09:42 Videos drwxr-xr-x 6 root root 4096 May 26 10:44 a -rw-r--r-- 1 root root 0 May 26 14:22 file -rw-r--r-- 1 root root 8 May 26 16:48 pri -rw-r--r-- 1 root root 34 May 26 17:20 zlo |
#/etc/crontab
bash: /etc/crontab: Permission denied |
#crontab
|
#cat /etc/crontab
# /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # |
#ls -l /etc/cron.daily/
total 32 -rwxr-xr-x 1 root root 7482 Apr 14 15:31 apt -rwxr-xr-x 1 root root 314 Apr 18 00:40 aptitude -rwxr-xr-x 1 root root 502 Nov 20 2007 bsdmainutils -rwxr-xr-x 1 root root 4073 May 10 11:23 exim4-base -rwxr-xr-x 1 root root 89 Jan 18 02:49 logrotate -rwxr-xr-x 1 root root 954 Mar 15 01:34 man-db -rwxr-xr-x 1 root root 3349 May 13 03:13 standard |
$ssh root@10.0.35.100
root@10.0.35.100's password: Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed May 27 10:42:46 2009 from linux1.unix.nt |
#init 6
|
$ssh root@10.0.35.100
root@10.0.35.100's password: Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed May 27 10:43:14 2009 from linux2.unix.nt |
#ls -l
total 48 drwxr-xr-x 2 root root 4096 May 26 16:16 BBBB drwxr-xr-x 2 user user 4096 May 25 09:42 Desktop drwxr-xr-x 2 user user 4096 May 25 09:42 Documents drwxr-xr-x 2 user user 4096 May 25 09:42 Download drwxr-xr-x 2 user user 4096 May 25 09:42 Music drwxr-xr-x 2 user user 4096 May 25 09:42 Pictures drwxr-xr-x 2 user user 4096 May 25 09:42 Public drwxr-xr-x 2 user user 4096 May 25 09:42 Templates drwxr-xr-x 2 user user 4096 May 25 09:42 Videos drwxr-xr-x 6 root root 4096 May 26 10:44 a -rw-r--r-- 1 root root 0 May 26 14:22 file -rw-r--r-- 1 root root 8 May 26 16:48 pri -rw-r--r-- 1 root root 34 May 26 17:20 zlo |
#cat /etc/crontab
# /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # |
#crontab -l
|
#cat /etc/crontab
# /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # |
#ls -l /etc/cron.monthly/
total 4 -rwxr-xr-x 1 root root 129 May 13 03:13 standard |
#vi /etc/crontab
|
$sshd
bash: sshd: command not found |
$ssh root@196.168.15.1
^C |
$/etc/imit.d/sshd restart
bash: /etc/imit.d/sshd: No such file or directory |
$/etc/init.d/sshd restart
bash: /etc/init.d/sshd: No such file or directory |
$ls -la /etc/init.d/
total 284 drwxr-xr-x 2 root root 4096 May 26 17:02 . drwxr-xr-x 82 root root 4096 May 27 10:35 .. -rw-r--r-- 1 root root 1510 Dec 26 2007 README -rwxr-xr-x 1 root root 4021 May 14 22:50 aumix -rwxr-xr-x 1 root root 2155 Jan 5 2008 bootlogd -rwxr-xr-x 1 root root 1988 Jul 16 2008 bootmisc.sh -rwxr-xr-x 1 root root 3004 Aug 12 2008 checkfs.sh -rwxr-xr-x 1 root root 9831 Dec 30 2007 checkroot.sh -rwxr-xr-x 1 root root 7651 Feb 20 20:00 console-screen.kbd.sh ... -rwxr-xr-x 1 root root 525 Jan 2 2008 stop-bootlogd -rwxr-xr-x 1 root root 1096 Jan 2 2008 stop-bootlogd-single -rwxr-xr-x 1 root root 515 Mar 28 23:16 sudo -rwxr-xr-x 1 root root 7345 Apr 18 04:44 udev -rwxr-xr-x 1 root root 1001 Jul 11 2008 udev-mtab -rwxr-xr-x 1 root root 3175 Mar 2 2008 umountfs -rwxr-xr-x 1 root root 2140 Dec 30 2007 umountnfs.sh -rwxr-xr-x 1 root root 1456 May 29 2008 umountroot -rwxr-xr-x 1 root root 1815 Sep 13 2006 urandom -rwxr-xr-x 1 root root 1777 Feb 2 14:29 x11-common |
$/etc/init.d/ssh restart
Could not load host key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_dsa_key Restarting OpenBSD Secure Shell server: sshdstart-stop-daemon: warning: failed to kill 2234: Operation not permitted Could not load host key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_dsa_key . |
$initd
bash: initd: command not found |
$ls -la /etc/init.d/|more
|
$/usr/sbin/sshd
Could not load host key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_dsa_key |
$ls /etc/ssh
moduli ssh_host_dsa_key ssh_host_rsa_key sshd_config ssh_config ssh_host_dsa_key.pub ssh_host_rsa_key.pub |
$su -
Password: l3-agent is already running: pid=3566; pidfile=/root/.lilalo/l3-agent.pid |
#ssh root@192.168.15.5
The authenticity of host '192.168.15.5 (192.168.15.5)' can't be established. RSA key fingerprint is 34:6c:c2:da:38:7c:d7:17:e9:cd:17:8d:e7:cf:f1:a6. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.5' (RSA) to the list of known hosts. root@192.168.15.5's password: Linux linux5 2.6.29-2-686 #1 SMP Sun May 17 17:56:29 UTC 2009 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed May 27 10:11:45 2009 l3-agent is already running: pid=2807; pidfile=/root/.lilalo/l3-agent.pid |
#screen -x
|
#screen -x
|
#ls -l
итого 8 drwxr-xr-x 5 root root 4096 Май 26 10:38 a -rw-r--r-- 1 root root 51 Май 25 16:54 vimrc |
#cat /etc/crontab
# /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # |
#apt-get install anacron
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: update-inetd portmap Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: anacron 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 29.2kB of archives. After this operation, 193kB of additional disk space will be used. Get:1 http://10.0.35.1 sid/main anacron 2.3-13.1 [29.2kB] Fetched 29.2kB in 0s (0B/s) Selecting previously deselected package anacron. (Reading database ... 42059 files and directories currently installed.) Unpacking anacron (from .../anacron_2.3-13.1_i386.deb) ... Processing triggers for man-db ... Setting up anacron (2.3-13.1) ... Starting anac(h)ronistic cron: anacron. |
#cat /etc/anacron
cat: /etc/anacron: No such file or directory |
#cat /etc/anacrontab
# /etc/anacrontab: configuration file for anacron # See anacron(8) and anacrontab(5) for details. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # These replace cron's entries 1 5 cron.daily nice run-parts --report /etc/cron.daily 7 10 cron.weekly nice run-parts --report /etc/cron.weekly @monthly 15 cron.monthly nice run-parts --report /etc/cron.monthly |
#ls -l /etc/cron.weekly
total 12 -rwxr-xr-x 1 root root 312 Mar 9 2008 0anacron -rwxr-xr-x 1 root root 372 May 20 2008 lpr -rwxr-xr-x 1 root root 528 Mar 15 01:34 man-db |
#apt-get install at
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: update-inetd portmap Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: at 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 43.1kB of archives. After this operation, 213kB of additional disk space will be used. Get:1 http://10.0.35.1 sid/main at 3.1.10.2 [43.1kB] Fetched 43.1kB in 0s (0B/s) Selecting previously deselected package at. (Reading database ... 42079 files and directories currently installed.) Unpacking at (from .../archives/at_3.1.10.2_i386.deb) ... Processing triggers for man-db ... Setting up at (3.1.10.2) ... Starting deferred execution scheduler: atd. |
#at now + 3 minutes
warning: commands will be executed using /bin/sh at> <EOT> job 1 at Wed May 27 11:40:00 2009 |
#atq -h
Usage: at [-V] [-q x] [-f file] [-mldbv] time at -c job ... atq [-V] [-q x] atrm [-V] job ... batch |
#man atq
|
#echo
|
#date
Wed May 27 11:48:16 EEST 2009 |
#date --h | less
|
#ntpdate ntp.psn.ru
27 May 11:52:03 ntpdate[5971]: step time server 194.149.67.130 offset 0.592250 sec |
#ps aux | grep sys
root 2207 0.0 0.0 28840 1688 ? Sl 10:35 0:00 /usr/sbin/rsyslogd -c3 102 2223 0.0 0.0 2784 1068 ? Ss 10:35 0:00 /usr/bin/dbus-daemon --system |
#less /etc/default/rsyslog
|
#sed -i 's/-c3/-c3 -r/' /etc/default/rsyslog
|
#less /etc/default/rsyslog
|
#echo teststststst | logger
|
#tail /var/////////////////////////log/messages
May 27 10:35:09 linux2 kernel: [ 8.459053] lo: Disabled Privacy Extensions May 27 10:35:09 linux2 rsyslogd: [origin software="rsyslogd" swVersion="3.22.0" x-pid="2207" x-info="http://www.rsyslog.com"] restart May 27 10:35:10 linux2 lpd[2510]: restarted May 27 10:35:13 linux2 kernel: [ 12.741656] [drm] Initialized drm 1.1.0 20060810 May 27 10:35:13 linux2 kernel: [ 12.749109] pci 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 May 27 10:35:13 linux2 kernel: [ 12.750156] mtrr: type mismatch for c0000000,10000000 old: write-back new: write-combining May 27 10:35:13 linux2 kernel: [ 12.750162] [drm] MTRR allocation failed. Graphics performance may suffer. May 27 10:35:13 linux2 kernel: [ 12.750213] [drm] Initialized i915 1.6.0 20080730 on minor 0 May 27 11:42:47 linux2 lpd[5929]: restarted May 27 12:19:22 linux2 logger: teststststst |
#echo teststststst | logger -t kernel
|
#tail /var//log/user.log
May 25 01:05:34 book shutdown[17266]: shutting down for system reboot May 24 22:26:04 book shutdown[2826]: shutting down for system reboot May 25 01:37:34 linux2 shutdown[2524]: shutting down for system halt May 25 18:24:27 linux2 shutdown[11879]: shutting down for system halt May 25 18:24:28 linux2 xfce4-panel: *** glibc detected *** xfce4-panel: double free or corruption (!prev): 0x0882e8b8 *** May 27 12:19:22 linux2 logger: teststststst May 27 12:23:21 linux2 kernel: teststststst |
#tail /var//log/kern.log
May 27 10:35:09 linux2 kernel: [ 8.458537] NET: Registered protocol family 10 May 27 10:35:09 linux2 kernel: [ 8.459053] lo: Disabled Privacy Extensions May 27 10:35:13 linux2 kernel: [ 12.741656] [drm] Initialized drm 1.1.0 20060810 May 27 10:35:13 linux2 kernel: [ 12.749109] pci 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 May 27 10:35:13 linux2 kernel: [ 12.749115] pci 0000:00:02.0: setting latency timer to 64 May 27 10:35:13 linux2 kernel: [ 12.750156] mtrr: type mismatch for c0000000,10000000 old: write-back new: write-combining May 27 10:35:13 linux2 kernel: [ 12.750162] [drm] MTRR allocation failed. Graphics performance may suffer. May 27 10:35:13 linux2 kernel: [ 12.750193] pci 0000:00:02.0: irq 27 for MSI/MSI-X May 27 10:35:13 linux2 kernel: [ 12.750213] [drm] Initialized i915 1.6.0 20080730 on minor 0 May 27 10:35:19 linux2 kernel: [ 18.484007] eth0: no IPv6 routers present |
#echo teststststst | logger -t sendmail -p mail.6
|
#tail /var/log/mail.log
May 27 12:25:35 linux2 sendmail: teststststst |
#tail /var/log/mail.log
May 27 12:25:35 linux2 sendmail: teststststst |
#echo teststststst | logger -t sendmail -p mail.6
|
#tail /var/log/mail.log
May 27 12:25:35 linux2 sendmail: teststststst May 27 12:28:24 linux2 sendmail: teststststst |
#tail /var/////////////////////////log/messages
May 27 10:35:09 linux2 rsyslogd: [origin software="rsyslogd" swVersion="3.22.0" x-pid="2207" x-info="http://www.rsyslog.com"] restart May 27 10:35:10 linux2 lpd[2510]: restarted May 27 10:35:13 linux2 kernel: [ 12.741656] [drm] Initialized drm 1.1.0 20060810 May 27 10:35:13 linux2 kernel: [ 12.749109] pci 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 May 27 10:35:13 linux2 kernel: [ 12.750156] mtrr: type mismatch for c0000000,10000000 old: write-back new: write-combining May 27 10:35:13 linux2 kernel: [ 12.750162] [drm] MTRR allocation failed. Graphics performance may suffer. May 27 10:35:13 linux2 kernel: [ 12.750213] [drm] Initialized i915 1.6.0 20080730 on minor 0 May 27 11:42:47 linux2 lpd[5929]: restarted May 27 12:19:22 linux2 logger: teststststst May 27 12:23:21 linux2 kernel: teststststst |
#var /etc/syslog.conf
bash: var: command not found |
# /etc/anacrontab: configuration file for anacron # See anacron(8) and anacrontab(5) for details. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # These replace cron's entries 1 5 cron.daily nice run-parts --report /etc/cron.daily 7 10 cron.weekly nice run-parts --report /etc/cron.weekly @monthly 15 cron.monthly nice run-parts --report /etc/cron.monthly
# /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) #
Время первой команды журнала | 17:34:59 2009- 5-26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:29:04 2009- 5-27 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 10.89 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 7.92 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.34 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.50 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008