/l3/users/22-06-2009/nt-ladm/debian4.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 |
|
#[root@fbsd2:tmp]# chmod 4755 testdir/
[root@fbsd2:tmp]# chmod 4755 LANG=C chmod: LANG=C: No such file or directory |
#[root@fbsd2:tmp]# ls -ld testdir
drwsr-xr-x 2 root wheel 512 Jul 8 21:43 testdir |
#[root@fbsd2:tmp]# ls -l testdir/file1
[root@fbsd2:tmp]# touch testdir/file1 -rw-r--r-- 1 root wheel 0 Jul 8 21:43 testdir/file1 |
#[root@fbsd2:tmp]# su - user
![]() This account is currently not available. |
#[root@fbsd2:tmp]# su - user2
![]() [root@fbsd2:tmp]# su - user1 su: unknown login: user1 su: unknown login: user2 |
#[root@fbsd2:tmp]# pw useradd 123 -m -d /home/123
[root@fbsd2:tmp]# pw useradd -m -d /home/123 123 pw: user name or id required |
#[root@fbsd2:tmp]# su - 123
![]() [root@fbsd2:tmp]# passwd 123 Changing local password for 123 New Password: Retype New Password: By pressing "Scroll Lock" you can use the arrow keys to scroll backward through the console output. Press "Scroll Lock" again to turn it off. $ bash [123@fbsd2 /usr/home/123]$ touch /tmp/testdir/file2 touch: /tmp/testdir/file2: Permission denied [123@fbsd2 /usr/home/123]$ exit exit $ exit |
#[root@fbsd2:tmp]# chmod o+w testdir/
[root@fbsd2:tmp]# ls -ld testdir/ drwsr-xr-x 2 root wheel 512 Jul 8 21:43 testdir/ |
#[root@fbsd2:tmp]# ls -ld testdir/
drwsr-xrwx 2 root wheel 512 Jul 8 21:43 testdir/ |
#[root@fbsd2:tmp]# su - 123
![]() [1]+ Stopped su - 123 |
#[root@fbsd2:tmp]# ls -l testdir/
[root@fbsd2:tmp]# su - 123 You can make a log of your terminal session with script(1). $ bash [123@fbsd2 /usr/home/123]$ touch /tmp/testdir/file2 [123@fbsd2 /usr/home/123]$ ls -l /tmp/testdir/file2 -rw-r--r-- 1 123 wheel 0 Jul 8 21:45 /tmp/testdir/file2 [123@fbsd2 /usr/home/123]$ id uid=1004(123) gid=1004(123) groups=1004(123) [123@fbsd2 /usr/home/123]$ exit exit $ exit total 0 -rw-r--r-- 1 root wheel 0 Jul 8 21:43 file1 -rw-r--r-- 1 123 wheel 0 Jul 8 21:45 file2 |
#[root@fbsd2:tmp]# chmod u-s,g+s testdir/
[root@fbsd2:tmp]# ls -ld testdir/ drwsr-xrwx 2 root wheel 512 Jul 8 21:45 testdir/ |
#[root@fbsd2:tmp]# touch testdir/file3
[root@fbsd2:tmp]# ls -ld testdir/ drwxr-srwx 2 root wheel 512 Jul 8 21:45 testdir/ |
#[root@fbsd2:tmp]# ls -l testdir/
total 0 -rw-r--r-- 1 root wheel 0 Jul 8 21:43 file1 -rw-r--r-- 1 123 wheel 0 Jul 8 21:45 file2 -rw-r--r-- 1 root wheel 0 Jul 8 21:47 file3 |
#[root@fbsd2:tmp]# exit
![]() [root@fbsd2:tmp]# su - 123 If you `set watch = (0 any any)' in tcsh, you will be notified when someone logs in or out of your system. $ bash [123@fbsd2 /usr/home/123]$ touch /tmp/testdir/file4 [123@fbsd2 /usr/home/123]$ ls -l /tmp/testdir/ total 0 -rw-r--r-- 1 root wheel 0 Jul 8 21:43 file1 -rw-r--r-- 1 123 wheel 0 Jul 8 21:45 file2 -rw-r--r-- 1 root wheel 0 Jul 8 21:47 file3 ... /dev/ad0s2e 496M 1.0M 455M 0% /tmp /dev/ad0s2f 3.4G 2.5G 634M 80% /usr /dev/ad0s2d 1.9G 38M 1.7G 2% /var 192.168.16.254:/data/iso 220G 217G 3.4G 98% /mnt /dev/md0 4.3G 4.3G 0B 100% /mnt1 [123@fbsd2 /usr/home/123]$ exit exit $ exit exit There are stopped jobs. |
#[root@fbsd2:tmp]# exit
![]() exit Connection to 192.168.16.210 closed. |
#screen -x
![]() |
#ps tree -p
![]() ERROR: TTY could not be found. ********* simple selection ********* ********* selection by list ********* -A all processes -C by command name -N negate selection -G by real group ID (supports names) -a all w/ tty except session leaders -U by real user ID (supports names) -d all except session leaders -g by session OR by effective group name -e all processes -p by process ID T all processes on this terminal -s processes in the sessions given a all w/ tty, including other users -t by tty g OBSOLETE -- DO NOT USE -u by effective user ID (supports names) ... -o,o user-defined -f full --Group --User --pid --cols --ppid -j,j job control s signal --group --user --sid --rows --info -O,O preloaded -o v virtual memory --cumulative --format --deselect -l,l long u user-oriented --sort --tty --forest --version -F extra full X registers --heading --no-heading --context ********* misc options ********* -V,V show version L list format codes f ASCII art forest -m,m,-L,-T,H threads S children in sum -y change -l format -M,Z security data c true command name -c scheduling class -w,w wide output n numeric WCHAN,UID -H process hierarchy |
#ps
init(1)─┬─cron(1220) ├─events/0(4) ├─gdm(1208)───gdm(28869)─┬─Xvnc(28870) │ └─fluxbox(28943)─┬─ssh-agent(28980) │ └─xterm(28987)───script(28991)───script(29040)───bash(29041+ ├─getty(1242) ├─getty(1243) ├─getty(1244) ├─getty(1245) ├─getty(1246) ... │ └─xenwatch(7) ├─l3-agent(2802) ├─l3-agent(10833) ├─migration/0(2) ├─sshd(1193)─┬─sshd(17685)───script(17687)───script(17726)───bash(17727) │ ├─sshd(28540)───script(28542)───script(28581)───bash(28582)───screen(28621)───screen(286+ │ ├─sshd(28757)───script(28759)───script(28798)───bash(28799)───screen(28822) │ ├─sshd(28877)───script(28879)───script(28918)───bash(28919)───screen(28942) │ └─sshd(29078)───script(29080)───script(29119)───bash(29120)───screen(29143) └─syslogd(1170) |
#pstree -p | less
|
#vim /etc/inittab
|
#ps
PID TTY TIME CMD 28657 ttyp6 00:00:00 bash 29336 ttyp6 00:00:00 ps |
#ps waux| grep
![]() Использование: grep [OPTION]... PATTERN [FILE]... Попробуйте `grep --help' для получения более подробного описания. |
#ps waux| grep init
root 1 0.0 0.1 1956 644 ? Ss Jun25 0:00 init [2] root 29354 0.0 0.1 4620 744 ttyp6 R+ 18:45 0:00 grep init |
#ps waux| grep -q init ; echo $?
0 |
#ps waux| grep -v grep | grep init
root 1 0.0 0.1 1956 644 ? Ss Jun25 0:00 init [2] |
#ps waux| grep -v perl
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 1956 644 ? Ss Jun25 0:00 init [2] root 2 0.0 0.0 0 0 ? S Jun25 0:00 [migration/0] root 3 0.0 0.0 0 0 ? SN Jun25 0:00 [ksoftirqd/0] root 4 0.0 0.0 0 0 ? S< Jun25 0:00 [events/0] root 5 0.0 0.0 0 0 ? S< Jun25 0:00 [khelper] root 6 0.0 0.0 0 0 ? S< Jun25 0:00 [kthread] root 7 0.0 0.0 0 0 ? S< Jun25 0:00 [xenwatch] root 8 0.0 0.0 0 0 ? S< Jun25 0:00 [xenbus] root 16 0.0 0.0 0 0 ? S< Jun25 0:00 [kblockd/0] ... root 29080 0.0 0.1 4712 676 ttypc Ss+ 18:13 0:00 script -f -q /root/.lilalo//338620471773929958-1247152404.script root 29119 0.0 0.0 4840 468 ttypc S+ 18:13 0:00 script -f -q /root/.lilalo//338620471773929958-1247152404.script root 29120 0.0 0.3 5824 1824 ttypd Ss 18:13 0:00 bash -i root 29143 0.0 0.1 5568 1020 ttypd S+ 18:13 0:00 screen -x root 29160 0.0 0.1 5456 1068 ttyp7 S+ 18:13 0:00 su - root root 29161 0.0 0.1 4716 680 ttyp7 S+ 18:14 0:00 script -f -q /root/.lilalo//2422617712257611269-1247152441.script root 29200 0.0 0.0 4844 472 ttyp7 S+ 18:14 0:00 script -f -q /root/.lilalo//2422617712257611269-1247152441.script root 29201 0.0 0.3 5824 1820 ttype Ss 18:14 0:00 bash -i root 29224 0.0 0.1 5564 1020 ttype S+ 18:14 0:00 screen -x root 29381 0.0 0.1 5172 992 ttyp6 R+ 18:46 0:00 ps waux |
#ps waux| grep -v perl5
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 1956 644 ? Ss Jun25 0:00 init [2] root 2 0.0 0.0 0 0 ? S Jun25 0:00 [migration/0] root 3 0.0 0.0 0 0 ? SN Jun25 0:00 [ksoftirqd/0] root 4 0.0 0.0 0 0 ? S< Jun25 0:00 [events/0] root 5 0.0 0.0 0 0 ? S< Jun25 0:00 [khelper] root 6 0.0 0.0 0 0 ? S< Jun25 0:00 [kthread] root 7 0.0 0.0 0 0 ? S< Jun25 0:00 [xenwatch] root 8 0.0 0.0 0 0 ? S< Jun25 0:00 [xenbus] root 16 0.0 0.0 0 0 ? S< Jun25 0:00 [kblockd/0] ... root 29080 0.0 0.1 4712 676 ttypc Ss+ 18:13 0:00 script -f -q /root/.lilalo//338620471773929958-1247152404.script root 29119 0.0 0.0 4840 468 ttypc S+ 18:13 0:00 script -f -q /root/.lilalo//338620471773929958-1247152404.script root 29120 0.0 0.3 5824 1824 ttypd Ss 18:13 0:00 bash -i root 29143 0.0 0.1 5568 1020 ttypd S+ 18:13 0:00 screen -x root 29160 0.0 0.1 5456 1068 ttyp7 S+ 18:13 0:00 su - root root 29161 0.0 0.1 4716 680 ttyp7 S+ 18:14 0:00 script -f -q /root/.lilalo//2422617712257611269-1247152441.script root 29200 0.0 0.0 4844 472 ttyp7 S+ 18:14 0:00 script -f -q /root/.lilalo//2422617712257611269-1247152441.script root 29201 0.0 0.3 5824 1820 ttype Ss 18:14 0:00 bash -i root 29224 0.0 0.1 5564 1020 ttype S+ 18:14 0:00 screen -x root 29390 0.0 0.1 5172 996 ttyp6 R+ 18:46 0:00 ps waux |
#ps waux| grep -v perl5.8
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 1956 644 ? Ss Jun25 0:00 init [2] root 2 0.0 0.0 0 0 ? S Jun25 0:00 [migration/0] root 3 0.0 0.0 0 0 ? SN Jun25 0:00 [ksoftirqd/0] root 4 0.0 0.0 0 0 ? S< Jun25 0:00 [events/0] root 5 0.0 0.0 0 0 ? S< Jun25 0:00 [khelper] root 6 0.0 0.0 0 0 ? S< Jun25 0:00 [kthread] root 7 0.0 0.0 0 0 ? S< Jun25 0:00 [xenwatch] root 8 0.0 0.0 0 0 ? S< Jun25 0:00 [xenbus] root 16 0.0 0.0 0 0 ? S< Jun25 0:00 [kblockd/0] ... root 29080 0.0 0.1 4712 676 ttypc Ss+ 18:13 0:00 script -f -q /root/.lilalo//338620471773929958-1247152404.script root 29119 0.0 0.0 4840 468 ttypc S+ 18:13 0:00 script -f -q /root/.lilalo//338620471773929958-1247152404.script root 29120 0.0 0.3 5824 1824 ttypd Ss 18:13 0:00 bash -i root 29143 0.0 0.1 5568 1020 ttypd S+ 18:13 0:00 screen -x root 29160 0.0 0.1 5456 1068 ttyp7 S+ 18:13 0:00 su - root root 29161 0.0 0.1 4716 680 ttyp7 S+ 18:14 0:00 script -f -q /root/.lilalo//2422617712257611269-1247152441.script root 29200 0.0 0.0 4844 472 ttyp7 S+ 18:14 0:00 script -f -q /root/.lilalo//2422617712257611269-1247152441.script root 29201 0.0 0.3 5824 1820 ttype Ss 18:14 0:00 bash -i root 29224 0.0 0.1 5564 1020 ttype S+ 18:14 0:00 screen -x root 29399 0.0 0.1 5176 996 ttyp6 R+ 18:46 0:00 ps waux |
#ps waux| grep
root 29409 0.0 0.1 4620 744 ttyp6 R+ 18:46 0:00 grep perl5.8 |
#ps waux| grep perl5
root 29418 0.0 0.1 4620 740 ttyp6 R+ 18:46 0:00 grep perl5 |
#ps waux| grep per
root 5 0.0 0.0 0 0 ? S< Jun25 0:00 [khelper] root 29427 0.0 0.1 4620 740 ttyp6 R+ 18:46 0:00 grep per |
#ps waux| grep perl
root 29436 0.0 0.1 4620 744 ttyp6 R+ 18:46 0:00 grep perl |
#w
18:46:59 up 14 days, 6:45, 8 users, load average: 0,02, 0,06, 0,02 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user :0 - 18:13 ?xdm? 33:01m 0.24s /usr/bin/fluxbox user ttyp2 :0.0 18:13 10:40m 0.11s 0.10s script -f -q /home/user/.lilalo//756228382805 root ttyp0 192.168.16.2 Mon18 3days 0.25s 0.00s script -f -q /root/.lilalo//24691674227160950 root ttyp8 host202.net.nt 18:11 29:07m 0.00s 0.00s script -f -q /root/.lilalo//21481959519333515 root ttypa 192.168.16.2 18:12 34:21m 0.01s 0.00s script -f -q /root/.lilalo//17247102648067473 root ttyp3 debian.net.nt 18:06 0.00s 0.01s 0.01s script -f -q /root/.lilalo//22370228161709727 root ttyp5 :ttyp4:S.0 18:06 0.00s 0.02s 0.02s script -f -q /root/.lilalo//17285633229294740 root ttypc host204.net.nt 18:13 30:39m 0.02s 0.00s script -f -q /root/.lilalo//33862047177392995 |
#ps waux| grep lilalo
root 17687 0.0 0.1 4712 676 ttyp0 Ss+ Jul06 0:00 script -f -q /root/.lilalo//246916742271609509-1246892920.script root 17726 0.0 0.0 4840 468 ttyp0 S+ Jul06 0:00 script -f -q /root/.lilalo//246916742271609509-1246892920.script root 28542 0.0 0.1 4716 680 ttyp3 Ss+ 18:06 0:00 script -f -q /root/.lilalo//22370228161709727766-1247151975.script root 28581 0.0 0.0 4844 472 ttyp3 S+ 18:06 0:00 script -f -q /root/.lilalo//22370228161709727766-1247151975.script root 28623 0.0 0.1 4716 680 ttyp5 Ss+ 18:06 0:00 script -f -q /root/.lilalo//172856332292947404-1247151990.script root 28656 0.0 0.0 4844 472 ttyp5 S+ 18:06 0:00 script -f -q /root/.lilalo//172856332292947404-1247151990.script root 28759 0.0 0.1 4716 680 ttyp8 Ss+ 18:11 0:00 script -f -q /root/.lilalo//214819595193335155-1247152296.script root 28798 0.0 0.0 4844 472 ttyp8 S+ 18:11 0:00 script -f -q /root/.lilalo//214819595193335155-1247152296.script root 28879 0.0 0.1 4712 680 ttypa Ss+ 18:12 0:00 script -f -q /root/.lilalo//172471026480674730-1247152347.script root 28918 0.0 0.0 4840 472 ttypa S+ 18:12 0:00 script -f -q /root/.lilalo//172471026480674730-1247152347.script user 28991 0.0 0.0 4504 508 ttyp2 Ss+ 18:13 0:00 script -f -q /home/user/.lilalo//756228382805926755-1247152394.script user 29040 0.0 0.0 4632 428 ttyp2 S+ 18:13 0:00 script -f -q /home/user/.lilalo//756228382805926755-1247152394.script root 29080 0.0 0.1 4712 676 ttypc Ss+ 18:13 0:00 script -f -q /root/.lilalo//338620471773929958-1247152404.script root 29119 0.0 0.0 4840 468 ttypc S+ 18:13 0:00 script -f -q /root/.lilalo//338620471773929958-1247152404.script root 29161 0.0 0.1 4716 680 ttyp7 S+ 18:14 0:00 script -f -q /root/.lilalo//2422617712257611269-1247152441.script root 29200 0.0 0.0 4844 472 ttyp7 S+ 18:14 0:00 script -f -q /root/.lilalo//2422617712257611269-1247152441.script root 29453 0.0 0.1 4624 744 ttyp6 R+ 18:47 0:00 grep lilalo |
#ps waux| grep lilalo | awk '{print $2}'
17687 17726 28542 28581 28623 28656 28759 28798 28879 28918 28991 29040 29080 29119 29161 29200 29462 |
##
|
#top
![]() top - 18:49:07 up 14 days, 6:48, 8 users, load average: 0.00, 0.03, 0.01 Tasks: 71 total, 1 running, 70 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 594068k total, 471412k used, 122656k free, 54272k buffers PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Swap: 0k total, 0k used, 0k free, 301688k cached 1 root 15 0 1956 644 552 S 0.0 0.1 0:00.05 init 2 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0 3 root 34 19 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/0 2 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0 ... 7 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 xenwatch 8 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 xenbus 16 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/0 18 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod 55 root 15 0 0 0 0 S 0.0 0.0 0:00.00 pdflush 56 root 15 0 0 0 0 S 0.0 0.0 0:00.19 pdflush 57 root 10 -5 0 0 0 S 0.0 0.0 0:00.10 kswapd0 58 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0 609 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kmirrord 707 root 10 -5 0 0 0 S 0.0 0.0 0:00.06 reiserfs/0 |
#ssh 192.168.16.254
top - 18:50:08 up 14 days, 9:59, 2 users, load average: 0.03, 0.01, 0.00 Tasks: 163 total, 5 running, 157 sleeping, 0 stopped, 1 zombie Cpu0 : 1.0%us, 0.7%sy, 0.0%ni, 95.7%id, 1.3%wa, 0.0%hi, 0.3%si, 1.0%st Cpu1 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Cpu2 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st 14124 root 15 0 402m 4772 1780 R 2 0.9 71:28.36 qemu-dm Cpu3 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st 18557 root 15 0 8208 2716 2252 S 0 0.5 0:00.03 sshd Mem: 512196k total, 505492k used, 6704k free, 57588k buffers ... 11 root RT 0 0 0 0 S 0 0.0 0:00.14 migration/3 11 root RT 0 0 0 0 S 0 0.0 0:00.14 migration/3 12 root 34 19 0 0 0 S 0 0.0 0:00.01 ksoftirqd/3 12 root 34 19 0 0 0 S 0 0.0 0:00.01 ksoftirqd/3 13 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/3 13 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/3 14 root 10 -5 0 0 0 S 0 0.0 0:00.27 events/0 14 root 10 -5 0 0 0 S 0 0.0 0:00.27 events/0 15 root 10 -5 0 0 0 S 0 0.0 0:00.07 events/1 16 root 10 -5 0 0 0 S 0 0.0 0:00.05 events/2 |
#[root@fbsd2:~]#
![]() |
#[root@fbsd2:~]#
|
#[root@fbsd2:~]#
|
#[root@fbsd2:~]#
![]() last pid: 61471; load averages: 1.00, 1.00, 1.00 up 7+23:44:52 18:51:57 35 processes36.9 running 0.0 sleepin63.1 0.0 0.0 CPU states: % user, % nice, % system, % interrupt, % idle Mem: 33M Active, 202M Inact, 66M Wired, 604K Cache, 48M Buf, 78M Free 0 Swap: 2015M Total, 2015M4Free 9432K 8080K connec 4:28 0.00% perl5.8.8 841 8 9432K 8132K nanslp 2:47 0.00% perl5.8.8 14011 8820K 760 1:12 42216 user 96 3528K 2936K select 0:07 sendmail 749 USERNAME THR PRI NICE 1396K 11RES STATE 0:03 WCPU cron ... 712 root 1 96 0 11852K 5028K select 0:02 0.00% gdm-binary 273 root 1 97 0 1472K 1064K select 0:01 0.00% dhclient 585 root 1 96 0 1404K 1072K select 0:01 0.00% syslogd 293 _dhcp 1 96 0 1472K 1124K select 0:01 0.00% dhclient 644 root 1 96 0 1296K 824K select 0:00 0.00% usbd 3543 root 1 96 0 7284K 6184K select 0:00 0.00% Xvnc 753 smmsp 1 20 0 3408K 2800K pause 0:00 0.00% sendmail 60903 root 1 8 0 3316K 2148K wait 0:00 0.00% bash 456 root 1 96 0 1436K 912K select 0:00 0.00% moused 60861 root 1 96 0 1348K 936K select 0:00 0.00% script |
#[root@fbsd2:~]#
|
#[root@fbsd2:~]#
|
#[root@fbsd2:~]# sysctl | grep -i cpu
![]() [root@fbsd2:~]# sysclt | grep -i cpu bash: sysclt: ËÏÍÁÎÄÁ ÎÅ ÎÁÊÄÅÎÁ usage: sysctl [-bdehNnoqx] name[=value] ... sysctl [-bdehNnoqx] -a |
#[root@fbsd2:~]# sysctl -a | grep -i cpu
kern.threads.virtual_cpu: 1 kern.sched.ipiwakeup.onecpu: 0 kern.ccpu: 1948 kern.smp.maxcpus: 16 kern.smp.cpus: 1 debug.cpufreq.lowest: 0 debug.cpufreq.verbose: 0 debug.kdb.stop_cpus: 1 debug.PMAP1changedcpu: 0 hw.model: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz ... machdep.cpu_idle_hlt: 1 machdep.hlt_cpus: 0 dev.cpu.0.%desc: ACPI CPU dev.cpu.0.%driver: cpu dev.cpu.0.%location: handle=\_PR_.PR00 dev.cpu.0.%pnpinfo: _HID=none _UID=0 dev.cpu.0.%parent: acpi0 dev.cpu.0.cx_supported: C1/0 dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_usage: 100.00% |
#[root@fbsd2:~]# dmidecode | less
|
#[root@fbsd2:~]# dmidecode > /tmp/hw
|
#ssh 192.168.16.210
Password: Last login: Thu Jul 9 18:10:28 2009 Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008 Welcome to FreeBSD! Before seeking technical support, please use the following resources: o Security advisories and updated errata information for all releases are at http://www.FreeBSD.org/releases/ - always consult the ERRATA section for your release first as it's updated frequently. ... http://www.FreeBSD.org/search/. If the doc distribution has been installed, they're also available formatted in /usr/share/doc. If you still have a question or problem, please take the output of `uname -a', along with any relevant error messages, and email it as a question to the questions@FreeBSD.org mailing list. If you are unfamiliar with FreeBSD's directory layout, please refer to the hier(7) manual page. If you are not familiar with manual pages, type `man man'. You may also use sysinstall(8) to re-enter the installation and configuration utility. Edit /etc/motd to change this login announcement. l3-agent is already running: pid=14011; pidfile=/root/.lilalo/l3-agent.pid |
#[root@fbsd2:~]#
![]() BIOS Revision: 3.3 Handle 0Manufacturer: Xen, 27 bytes Product Name: HVM domU System IVersion: 3.3.0 Serial Number: d939a500-225b-9980-aa1e-911abe87b9cc UUID: D939A500-225B-9980-AA1E-911ABE87B9CC Wake-up Type: Power Switch SKU Number: Not Specified Family: Not Specified Handle 0x0300, DMI type 3, 13 bytes Manufacturer: Xen Type: Other Lock: Not Present Version: Not Specified Chassis Information |
#[root@fbsd2:~]#
![]() |
#[root@fbsd2:~]#
![]() |
#[root@fbsd2:~]# exit
exit Connection to 192.168.16.210 closed. |
#ssh 192.168.16.254
Connection to 192.168.16.254 closed. |
#top
![]() top - 19:01:50 up 14 days, 7:00, 8 users, load average: 0.07, 0.06, 0.01 Tasks: 71 total, 2 running, 69 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 594068k total, 473808k used, 120260k free, 54272k buffers PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Swap: 0k total, 0k used, 0k free, 303800k cached 1 root 15 0 1956 644 552 S 0.0 0.1 0:00.05 init 2 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0 3 root 34 19 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/0 4 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/0 ... 16 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/0 18 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod 55 root 15 0 0 0 0 S 0.0 0.0 0:00.00 pdflush 56 root 15 0 0 0 0 S 0.0 0.0 0:00.19 pdflush 57 root 10 -5 0 0 0 S 0.0 0.0 0:00.10 kswapd0 58 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0 609 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kmirrord 707 root 10 -5 0 0 0 S 0.0 0.0 0:00.06 reiserfs/0 1170 root 18 0 1764 644 516 S 0.0 0.1 0:00.09 syslogd 1176 root 15 0 1712 380 312 S 0.0 0.1 0:00.00 klogd |
#man signals
![]() |
#kill --list
![]() NAME signal - list of available signals DESCRIPTION [root@debian4:~]# man signal Переформатирование signal(7), подождите... The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored. ESCOA bash: kill: -list: invalid signal specification ESCOA ESCOA ... nals. Signal Dispositions Each signal has a current disposition, which determines how the process behaves when it is delivered the signal. The entries in the "Action" column of the tables below specify the default disposition for each sig‐ nal, as follows: Term Default action is to terminate the process. Ign Default action is to ignore the signal. Core Default action is to terminate the process and dump core (see core(5)). Stop Default action is to stop the process. |
#kill -
![]() bash: kill: list: invalid signal specification |
#kill -l
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM 16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP 21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ 26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR 31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3 38) SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8 43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13 48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12 53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7 58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2 63) SIGRTMAX-1 64) SIGRTMAX |
#kill -list
![]() bash: kill: list: invalid signal specification |
#kill -list
![]() [root@debian4:~]# man signal ÐеÑеÑоÑмаÑиÑование signal(7), подождиÑе... CONFORMING TO POSIX.1ng the SA_SIGINFO flag to sigaction(2) then it can obtain this data via the si_value field of the siginfo_t structure passed as the second argument to the handler. Furthermore, the si_pid BUGS and si_uid fields of this structure can be used to obtain the PID and real user ID of the proâ SIGIO and SIGLOST have the same value. The latter is commented out in the kernel source, but the build process of some software still thinks that signal 29 is SIGLOST. the signal is delivered. 3. Real-time signals are delivered in a guaranteed order. Multiple real-time signals of the same SEE ALSO type are delivered in the order they were sent. If different real-time signals are sent to a ... The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.es the set of signals that the According to POSIX, an implementation should permit at least _POSIX_SIGQUEUE_MAX (32) real-time sigâ nals to be queued to a process. However, Linux does things differently. In kernels up to and including 2.6.7, Linux imposes a system-wide limit on the number of queued real-time signals for all processes. This limit can be viewed and (with privilege) changed via the /proc/sys/kernel/rtsig-max file. A related file, /proc/sys/kernel/rtsig-nr, can be used to find out how many real-time signals are currently queued. In Linux 2.6.8, these /proc interfaces were replaced by the RLIMIT_SIGPENDING resource limit, which specifies a per-user limit for queued signals; see setrlimit(2) for further details. 27,27,29 Term Profiling timer expired)signal blocked. If more than one of the SIGSYS 12,-,12 Core Bad argument to routine (SVr4)n arbitrary thread to which to deliver |
#kill -l
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM 16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP 21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ 26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR 31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3 38) SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8 43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13 48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12 53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7 58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2 63) SIGRTMAX-1 64) SIGRTMAX |
#killall
HUP INT QUIT ILL TRAP ABRT IOT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS UNUSED |
#pgrep lila*
![]() |
#pgrep lila\
![]() |
#pgrep "
![]() [root@debian4:~]# pgrep lila.* |
#pgrep -x lila*
![]() Specifies an Extended Regular Expression for matching against the process names or command lines. EXAMPLES Example 1: Find the process ID of the named daemon: $ pgrep -u root named NAME pgrep, pkill - look up or signal processes based on name and other attributes SYNOPSIS pgrep [-flvx] [-d delimiter] [-n|-o] [-P ppid,...] [-g pgrp,...] [-s sid,...] [-u euid,...] [-U uid,...] [-G gid,...] [-t term,...] [pattern] ... -v Negates the matching. [-G gid,...] [-t term,...] [pattern] $ ps -fp $(pgrep -d, -x xterm)ecently started) of the matching processes. DESCRIPTION pgrep looks through the currently running processes and lists the process IDs which matches the selection criteria to stdout. All the criteria have to match. For example, $ pgrep -u root sshd will only list the processes called sshd AND owned by root. On the other hand, $ pgrep -u root,daemon will list the processes owned by root OR daemon. |
#pgrep -x lila\
![]() |
#pgrep -x l
![]() |
#pgrep -x
![]() Usage: pgrep [-cflvx] [-d DELIM] [-n|-o] [-P PPIDLIST] [-g PGRPLIST] [-s SIDLIST] [-u EUIDLIST] [-U UIDLIST] [-G GIDLIST] [-t TERMLIST] [PATTERN] |
#pgrep -gx
![]() pgrep: invalid process group: x |
#pgrep -g root
![]() pgrep: invalid process group: root |
#pgrep -u 0
[root@debian4:~]# man pgrep Переформатирование pgrep(1), подождите... stdout. 1 2AME 3 pgrep, pkill - look up or signal processes based on name and other attributes 4 5YNOPSIS 6 pgrep [-flvx] [-d delimiter] [-n|-o] [-P ppid,...] [-g pgrp,...] [-s sid,...] [-u euid,...] 7 [-U uid,...] [-G gid,...] [-t term,...] [pattern] ... 29078 29080 29119 29120 29143 29160 29161 29200 29201 29224 |
#man pgrep
|
#pidof lilalo
![]() |
#pidof --help
![]() pidof: invalid options on command line! |
#man pidof
|
#pidof /root/.lilalo
![]() |
#pidof named
![]() |
#ps aux | less
|
#pidof
1 |
#pidof gdm
28869 1208 |
#pidof cron
1220 |
#pidof getty
1247 1246 1245 1244 1243 1242 |
#kill -9 `pidof hostapd`
![]() kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] |
#kill -9
![]() kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] |
#pidof -- lilalo.*
![]() |
#pidof -- lilalo\
![]() |
#pidof -- lilalo
![]() |
#pidof -- li
![]() |
#pidof --
![]() |
#pidof -- -u 0
![]() |
#pidof
![]() pidof: invalid options on command line! |
Время первой команды журнала | 20:43:41 2009- 7- 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 18:17:17 2009- 7- 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 39.60 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.51 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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