| /l3/users/29-07-2013/NT-Ladm/debian2.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 |
|
|
#ls -l
итого 60 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir1 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir2 drwxr-xr-x 6 root root 4096 Июл 29 13:55 dir4 drw-r-xr-x 2 root root 4096 Июл 29 13:57 dir5 -rwxr-xr-x 1 root root 74 Июл 31 14:04 file1 -rw-r--r-- 1 root root 251 Июл 29 16:47 file10 -rw-r--r-- 1 root root 0 Июл 29 14:26 file123 -rw-r--r-- 1 root root 35 Июл 30 13:42 file2 -rw-r--r-- 1 root root 1373 Июл 29 14:32 file3 ... -rw-r--r-- 1 root root 0 Июл 30 13:31 kiev lrwxrwxrwx 1 root root 5 Июл 29 14:46 link -> file9 -rw-r--r-- 1 root root 0 Июл 30 13:31 london drwx------ 2 root root 4096 Июл 31 11:50 Mail -rw-r--r-- 1 root root 0 Июл 30 13:31 new -rw-r--r-- 1 root root 0 Июл 30 13:31 pariz -rw-r--r-- 1 root root 994 Июл 29 16:53 passwd -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen123 -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen124 -rwxrwxrwx 1 root root 0 Июл 30 13:31 york |
|
#chmod 755 york
|
|
#ls -l
итого 60 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir1 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir2 drwxr-xr-x 6 root root 4096 Июл 29 13:55 dir4 drw-r-xr-x 2 root root 4096 Июл 29 13:57 dir5 -rwxr-xr-x 1 root root 74 Июл 31 14:04 file1 -rw-r--r-- 1 root root 251 Июл 29 16:47 file10 -rw-r--r-- 1 root root 0 Июл 29 14:26 file123 -rw-r--r-- 1 root root 35 Июл 30 13:42 file2 -rw-r--r-- 1 root root 1373 Июл 29 14:32 file3 ... -rw-r--r-- 1 root root 0 Июл 30 13:31 kiev lrwxrwxrwx 1 root root 5 Июл 29 14:46 link -> file9 -rw-r--r-- 1 root root 0 Июл 30 13:31 london drwx------ 2 root root 4096 Июл 31 11:50 Mail -rw-r--r-- 1 root root 0 Июл 30 13:31 new -rw-r--r-- 1 root root 0 Июл 30 13:31 pariz -rw-r--r-- 1 root root 994 Июл 29 16:53 passwd -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen123 -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen124 -rwxr-xr-x 1 root root 0 Июл 30 13:31 york |
|
#chmod 4755 york
|
|
#ls -l
итого 60 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir1 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir2 drwxr-xr-x 6 root root 4096 Июл 29 13:55 dir4 drw-r-xr-x 2 root root 4096 Июл 29 13:57 dir5 -rwxr-xr-x 1 root root 74 Июл 31 14:04 file1 -rw-r--r-- 1 root root 251 Июл 29 16:47 file10 -rw-r--r-- 1 root root 0 Июл 29 14:26 file123 -rw-r--r-- 1 root root 35 Июл 30 13:42 file2 -rw-r--r-- 1 root root 1373 Июл 29 14:32 file3 ... -rw-r--r-- 1 root root 0 Июл 30 13:31 kiev lrwxrwxrwx 1 root root 5 Июл 29 14:46 link -> file9 -rw-r--r-- 1 root root 0 Июл 30 13:31 london drwx------ 2 root root 4096 Июл 31 11:50 Mail -rw-r--r-- 1 root root 0 Июл 30 13:31 new -rw-r--r-- 1 root root 0 Июл 30 13:31 pariz -rw-r--r-- 1 root root 994 Июл 29 16:53 passwd -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen123 -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen124 -rwsr-xr-x 1 root root 0 Июл 30 13:31 york |
|
#chmod 2755 york
|
|
#ls -l
итого 60 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir1 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir2 drwxr-xr-x 6 root root 4096 Июл 29 13:55 dir4 drw-r-xr-x 2 root root 4096 Июл 29 13:57 dir5 -rwxr-xr-x 1 root root 74 Июл 31 14:04 file1 -rw-r--r-- 1 root root 251 Июл 29 16:47 file10 -rw-r--r-- 1 root root 0 Июл 29 14:26 file123 -rw-r--r-- 1 root root 35 Июл 30 13:42 file2 -rw-r--r-- 1 root root 1373 Июл 29 14:32 file3 ... -rw-r--r-- 1 root root 0 Июл 30 13:31 kiev lrwxrwxrwx 1 root root 5 Июл 29 14:46 link -> file9 -rw-r--r-- 1 root root 0 Июл 30 13:31 london drwx------ 2 root root 4096 Июл 31 11:50 Mail -rw-r--r-- 1 root root 0 Июл 30 13:31 new -rw-r--r-- 1 root root 0 Июл 30 13:31 pariz -rw-r--r-- 1 root root 994 Июл 29 16:53 passwd -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen123 -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen124 -rwxr-sr-x 1 root root 0 Июл 30 13:31 york |
|
#chmod 1755 york
|
|
#ls -l
итого 60 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir1 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir2 drwxr-xr-x 6 root root 4096 Июл 29 13:55 dir4 drw-r-xr-x 2 root root 4096 Июл 29 13:57 dir5 -rwxr-xr-x 1 root root 74 Июл 31 14:04 file1 -rw-r--r-- 1 root root 251 Июл 29 16:47 file10 -rw-r--r-- 1 root root 0 Июл 29 14:26 file123 -rw-r--r-- 1 root root 35 Июл 30 13:42 file2 -rw-r--r-- 1 root root 1373 Июл 29 14:32 file3 ... -rw-r--r-- 1 root root 0 Июл 30 13:31 kiev lrwxrwxrwx 1 root root 5 Июл 29 14:46 link -> file9 -rw-r--r-- 1 root root 0 Июл 30 13:31 london drwx------ 2 root root 4096 Июл 31 11:50 Mail -rw-r--r-- 1 root root 0 Июл 30 13:31 new -rw-r--r-- 1 root root 0 Июл 30 13:31 pariz -rw-r--r-- 1 root root 994 Июл 29 16:53 passwd -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen123 -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen124 -rwxr-xr-t 1 root root 0 Июл 30 13:31 york |
|
#chmod 7755 york
|
|
#ls -l
итого 60 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir1 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir2 drwxr-xr-x 6 root root 4096 Июл 29 13:55 dir4 drw-r-xr-x 2 root root 4096 Июл 29 13:57 dir5 -rwxr-xr-x 1 root root 74 Июл 31 14:04 file1 -rw-r--r-- 1 root root 251 Июл 29 16:47 file10 -rw-r--r-- 1 root root 0 Июл 29 14:26 file123 -rw-r--r-- 1 root root 35 Июл 30 13:42 file2 -rw-r--r-- 1 root root 1373 Июл 29 14:32 file3 ... -rw-r--r-- 1 root root 0 Июл 30 13:31 kiev lrwxrwxrwx 1 root root 5 Июл 29 14:46 link -> file9 -rw-r--r-- 1 root root 0 Июл 30 13:31 london drwx------ 2 root root 4096 Июл 31 11:50 Mail -rw-r--r-- 1 root root 0 Июл 30 13:31 new -rw-r--r-- 1 root root 0 Июл 30 13:31 pariz -rw-r--r-- 1 root root 994 Июл 29 16:53 passwd -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen123 -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen124 -rwsr-sr-t 1 root root 0 Июл 30 13:31 york |
|
#chown vasya:root york
|
|
#ls -l
итого 60 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir1 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir2 drwxr-xr-x 6 root root 4096 Июл 29 13:55 dir4 drw-r-xr-x 2 root root 4096 Июл 29 13:57 dir5 -rwxr-xr-x 1 root root 74 Июл 31 14:04 file1 -rw-r--r-- 1 root root 251 Июл 29 16:47 file10 -rw-r--r-- 1 root root 0 Июл 29 14:26 file123 -rw-r--r-- 1 root root 35 Июл 30 13:42 file2 -rw-r--r-- 1 root root 1373 Июл 29 14:32 file3 ... -rw-r--r-- 1 root root 0 Июл 30 13:31 kiev lrwxrwxrwx 1 root root 5 Июл 29 14:46 link -> file9 -rw-r--r-- 1 root root 0 Июл 30 13:31 london drwx------ 2 root root 4096 Июл 31 11:50 Mail -rw-r--r-- 1 root root 0 Июл 30 13:31 new -rw-r--r-- 1 root root 0 Июл 30 13:31 pariz -rw-r--r-- 1 root root 994 Июл 29 16:53 passwd -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen123 -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen124 -rwxr-xr-t 1 vasya root 0 Июл 30 13:31 york |
|
#chgrp user york
|
|
#ls -l
итого 60 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir1 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir2 drwxr-xr-x 6 root root 4096 Июл 29 13:55 dir4 drw-r-xr-x 2 root root 4096 Июл 29 13:57 dir5 -rwxr-xr-x 1 root root 74 Июл 31 14:04 file1 -rw-r--r-- 1 root root 251 Июл 29 16:47 file10 -rw-r--r-- 1 root root 0 Июл 29 14:26 file123 -rw-r--r-- 1 root root 35 Июл 30 13:42 file2 -rw-r--r-- 1 root root 1373 Июл 29 14:32 file3 ... -rw-r--r-- 1 root root 0 Июл 30 13:31 kiev lrwxrwxrwx 1 root root 5 Июл 29 14:46 link -> file9 -rw-r--r-- 1 root root 0 Июл 30 13:31 london drwx------ 2 root root 4096 Июл 31 11:50 Mail -rw-r--r-- 1 root root 0 Июл 30 13:31 new -rw-r--r-- 1 root root 0 Июл 30 13:31 pariz -rw-r--r-- 1 root root 994 Июл 29 16:53 passwd -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen123 -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen124 -rwxr-xr-t 1 vasya user 0 Июл 30 13:31 york |
|
#chgrp user1 york
chgrp: неверная группа: «user1» |
|
#ls
dir1 dir5 file123 file6 hard_link kiev Mail passwd york dir2 file1 file2 file8 inittab link new wilen123 dir4 file10 file3 file9 kharkov london pariz wilen124 |
|
#ls dir5
|
|
#ls dir3
ls: невозможно получить доступ к dir3: Нет такого файла или каталога |
|
#ls dir4
01 02 03 04 |
|
#ls dir4 -l
итого 16 drwxr-xr-x 2 root root 4096 Июл 29 13:55 01 drwxr-xr-x 2 root root 4096 Июл 29 13:55 02 drwxr-xr-x 2 root root 4096 Июл 29 13:55 03 drwxr-xr-x 2 root root 4096 Июл 29 13:55 04 |
|
#chmod -R 777 dir4
|
|
#ls -ld dir4
drwxrwxrwx 6 root root 4096 Июл 29 13:55 dir4 |
|
#ls -ld dir4/
drwxrwxrwx 6 root root 4096 Июл 29 13:55 dir4/ |
|
#ls -l dir4/
итого 16 drwxrwxrwx 2 root root 4096 Июл 29 13:55 01 drwxrwxrwx 2 root root 4096 Июл 29 13:55 02 drwxrwxrwx 2 root root 4096 Июл 29 13:55 03 drwxrwxrwx 2 root root 4096 Июл 29 13:55 04 |
|
#chown -R user:vasya dir4
|
|
#apt-get install sudo
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Пакеты, которые будут обновлены: sudo обновлено 1, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 65 пакетов не обновлено. Необходимо скачать 593 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 0 B. Получено:1 http://security.debian.org/ squeeze/updates/main sudo i386 1.7.4p4-2.squeeze.4 [593 kB] Получено 593 kБ за 0с (815 kБ/c) Чтение журнала изменений... Выполнено (Чтение базы данных ... на данный момент установлено 34952 файла и каталога.) Подготовка к замене пакета sudo 1.7.4p4-2.squeeze.3 (используется файл .../sudo_1.7.4p4-2.squeeze.4_i386.deb) ... Распаковывается замена для пакета sudo ... Обрабатываются триггеры для man-db ... Настраивается пакет sudo (1.7.4p4-2.squeeze.4) ... |
|
#vim /etc/sudoers
|
|
#export EDITOR=vim
|
|
#visudo
14 # Cmnd alias specification
15
16 # User privilege specification
17 root ALL=(ALL) ALL
18
19 # Allow members of group sudo to execute any command
20 # (Note tha=(lat)r entries override this, so you might need to move
user ALL=(ALL) ALL
21 # Allow members of group sudo to execute any command
22 %sudo ALL=(ALL) ALL
24 #includedir /etc/sudoers.d
"/etc/sudoers.tmp" 24L, 509C записано
|
|
#sudo user
sudo: user: command not found |
|
#su user -
user@debian2:/root$
user@debian2:/root$
user@debian2:/root$ ifconfig
bash: ifconfig: команда не найдена
user@debian2:/root$ sudo ifconfig
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
...
RX bytes:560 (560.0 B) TX bytes:560 (560.0 B)
user@debian2:/root$ sudo su -
l3-agent is already running: pid=1972; pidfile=/root/.lilalo/l3-agent.pid
root@debian2:~# exit
logout
user@debian2:/root$ sudo -s
root@debian2:~# exit
exit
user@debian2:/root$ exit
exit
|
|
#pwd
/root |
|
#ls -la
итого 140 drwx------ 14 root root 4096 Июл 31 17:14 . drwxr-xr-x 21 root root 4096 Июл 31 13:42 .. drwx------ 2 root root 4096 Июн 11 2012 .aptitude -rw------- 1 root root 10727 Июл 31 17:17 .bash_history -rw-r--r-- 1 root root 10 Июл 5 2012 .bash_profile -rw-r--r-- 1 root root 627 Июл 31 11:39 .bashrc drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir1 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir2 drwxrwxrwx 6 user vasya 4096 Июл 29 13:55 dir4 ... -rw-r--r-- 1 root root 994 Июл 29 16:53 passwd -rw-r--r-- 1 root root 140 Ноя 19 2007 .profile drwx------ 2 root root 4096 Июл 29 15:28 .ssh drwxr-xr-x 2 root root 4096 Июл 29 17:39 .vim -rw------- 1 root root 7023 Июл 31 17:14 .viminfo -rw-r--r-- 1 root root 50 Июл 29 17:03 .vimrc drwx------ 2 root root 4096 Июл 30 15:59 .w3m -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen123 -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen124 -rwxr-xr-t 1 vasya user 0 Июл 30 13:31 york |
|
#cd /etc/
|
|
#ls -la
итого 808 drwxr-xr-x 79 root root 4096 Июл 31 17:14 . drwxr-xr-x 21 root root 4096 Июл 31 13:42 .. drwxr-xr-x 3 root root 4096 Июн 11 2012 acpi -rw-r--r-- 1 root root 2981 Июн 11 2012 adduser.conf -rw-r--r-- 1 root root 47 Авг 6 2012 adjtime -rw-r--r-- 1 root root 196 Июн 11 2012 aliases drwxr-xr-x 2 root root 4096 Июл 5 2012 alternatives -rw-r--r-- 1 root root 395 Ноя 1 2009 anacrontab drwxr-xr-x 3 root root 4096 Июл 5 2012 apm ... -rw-r--r-- 1 root root 1552 Янв 14 2009 trafshow -rw-r--r-- 1 root root 1260 Май 30 2008 ucf.conf drwxr-xr-x 4 root root 4096 Июл 5 2012 udev drwxr-xr-x 3 root root 4096 Июн 11 2012 ufw -rw-r--r-- 1 root root 274 Ноя 4 2009 updatedb.conf drwxr-xr-x 2 root root 4096 Июн 11 2012 vim drwxr-xr-x 2 root root 4096 Июн 11 2012 w3m -rw-r--r-- 1 root root 4496 Сен 5 2010 wgetrc drwxr-xr-x 7 root root 4096 Июл 5 2012 X11 drwxr-xr-x 2 root root 4096 Июн 11 2012 xml |
|
#hostname
debian2 |
|
#mail
No mail for root |
|
#vim /etc/mail
|
|
#vim /etc/aliases
|
|
#ls -l /dev/xvd*
brw-rw---- 1 root disk 202, 0 Июл 29 08:53 /dev/xvda brw-rw---- 1 root disk 202, 1 Июл 29 08:54 /dev/xvda1 brw-rw---- 1 root disk 202, 16 Июл 29 08:53 /dev/xvdb |
|
#ssh root@192.168.13.253
root@192.168.13.253's password: Linux fobos 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 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. No mail. Last login: Wed Jul 31 18:03:37 2013 from 10.1.64.160 fobos:~# ls -l /dev/sd* ... fobos:~# lsof /mnt [1]+ УбиÑо sleep 60000 (wd: /mnt) (wd now: ~) fobos:~# lsof /mnt fobos:~# umount /mnt fobos:~# ls /dev/xvdb ls: невозможно полÑÑиÑÑ Ð´Ð¾ÑÑÑп к /dev/xvdb: ÐÐµÑ Ñакого Ñайла или каÑалога fobos:~# exit logout Connection to 192.168.13.253 closed. |
|
#ssh root@192.168.13.253
texws023 1 1024 1 ------ 38143.9 fobos:~# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 4330 2 r----- 58306.9 debian1 3 512 1 -b---- 322.5 debian2 4 512 1 -b---- 2022.2 debian3 5 512 1 -b---- 127.7 texws023 1 1024 1 -b---- 38144.0 fobos:~# xm create xen/centos4 Using config file "./xen/centos4". Started domain centos4 (id=10) fobos:~# exit logout Connection to 192.168.13.253 closed. |
|
#ssh root@192.168.13.1
# device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). -ro 0 1 # swap was on /dev/sda5 during installationtions> <dump> <pass> 0 0 UUID=2ebf7767-94d0-47d1-aed5-eb1c21e893ab nonets 0 swap sw /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0 ~ ~ ~ t ~ ~ ~ ~ root@debian1:~# exit logout Connection to 192.168.13.1 closed. |
|
#pd
l3script: pd: команда не найдена |
|
#ps
PID TTY TIME CMD 10320 pts/3 00:00:01 l3script 12981 pts/3 00:00:00 ps |
|
#ps a
PID TTY STAT TIME COMMAND 1735 tty1 Ss+ 0:00 /sbin/getty 38400 tty1 1736 tty2 Ss+ 0:00 /sbin/getty 38400 tty2 1737 tty3 Ss+ 0:00 /sbin/getty 38400 tty3 1738 tty4 Ss+ 0:00 /sbin/getty 38400 tty4 1739 tty5 Ss+ 0:00 /sbin/getty 38400 tty5 1740 tty6 Ss+ 0:00 /sbin/getty 38400 tty6 2169 pts/2 Ss 0:00 -bash 2198 pts/1 Ss 0:00 -bash 2739 pts/4 Ss 0:00 -bash 3079 pts/4 S+ 0:00 screen 3081 pts/0 Ss 0:00 /bin/bash 3082 pts/1 S+ 0:00 screen -x 3083 pts/2 S+ 0:00 screen -x 6711 pts/5 Ss+ 0:00 -bash 10278 pts/0 S+ 0:00 script -f -c l3script -q /root/.lilalo//1297024767109 10319 pts/0 S+ 0:00 script -f -c l3script -q /root/.lilalo//1297024767109 10320 pts/3 Ss 0:01 l3script 12989 pts/3 R+ 0:00 ps a |
|
#man ps
|
|
#ps x
PID TTY STAT TIME COMMAND
1 ? Ss 0:04 init [2]
2 ? S 0:00 [kthreadd]
3 ? S 0:01 [ksoftirqd/0]
5 ? S 0:00 [kworker/u:0]
6 ? S 0:00 [migration/0]
7 ? S 0:03 [watchdog/0]
8 ? S< 0:00 [cpuset]
9 ? S< 0:00 [khelper]
10 ? S< 0:00 [netns]
...
3080 ? Ss 0:11 SCREEN
3081 pts/0 Ss 0:00 /bin/bash
3082 pts/1 S+ 0:00 screen -x
3083 pts/2 S+ 0:00 screen -x
5315 ? Ss 0:00 /usr/sbin/squid3 -YC -f /etc/squid3/squid.conf
6707 ? Ss 0:00 sshd: user [priv]
10278 pts/0 S+ 0:00 script -f -c l3script -q /root/.lilalo//1297024767109
10319 pts/0 S+ 0:00 script -f -c l3script -q /root/.lilalo//1297024767109
10320 pts/3 Ss 0:01 l3script
13030 pts/3 R+ 0:00 ps x
|
|
#ps x|less
|
|
#ps ax|less
|
|
#kill -9 6710
|
|
#ps ax|less
|
|
#ps U user
PID TTY STAT TIME COMMAND 6725 ? Ss 0:50 l3-agent 13107 pts/5 S 0:00 su user - 13108 pts/5 S 0:00 bash - 13131 pts/5 S+ 0:00 sleep 5000 |
|
#ps p 13131
PID TTY STAT TIME COMMAND 13131 pts/5 S+ 0:00 sleep 5000 |
|
#ps t pts/5
PID TTY STAT TIME COMMAND 13081 pts/5 Ss 0:00 -bash 13107 pts/5 S 0:00 su user - 13108 pts/5 S 0:00 bash - 13131 pts/5 S+ 0:00 sleep 5000 |
|
#pu -t pts/5 u
l3script: pu: команда не найдена |
|
#ps -t pts/5 u
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 13081 0.0 0.5 7420 2988 pts/5 Ss 14:28 0:00 -bash user 13107 0.0 0.2 5700 1140 pts/5 S 14:29 0:00 su user - user 13108 0.2 1.0 9652 5220 pts/5 S 14:29 0:00 bash - user 13131 0.0 0.0 4928 504 pts/5 S+ 14:29 0:00 sleep 5000 |
|
#ps -t pts/5 l
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 13081 13079 20 0 7420 2988 - Ss pts/5 0:00 -bash 4 1000 13107 13081 20 0 5700 1140 - S pts/5 0:00 su user - 0 1000 13108 13107 20 0 9652 5220 - S pts/5 0:00 bash - 0 1000 13131 13108 20 0 4928 504 - S+ pts/5 0:00 sleep 5000 |
|
#ps -t pts/5 lu
ERROR: Conflicting format options. ********* 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 -t pts/5 o user,pid,ppid,ni,tty,cmd
USER PID PPID NI TT CMD root 13081 13079 0 pts/5 -bash user 13107 13081 0 pts/5 su user - user 13108 13107 0 pts/5 bash - user 13131 13108 0 pts/5 sleep 5000 |
|
#ps
USER PID PPID NI TT CMD root 1735 1 0 tty1 /sbin/getty 38400 tty1 root 1736 1 0 tty2 /sbin/getty 38400 tty2 root 1737 1 0 tty3 /sbin/getty 38400 tty3 root 1738 1 0 tty4 /sbin/getty 38400 tty4 root 1739 1 0 tty5 /sbin/getty 38400 tty5 root 1740 1 0 tty6 /sbin/getty 38400 tty6 root 2169 2164 0 pts/2 -bash root 2198 2196 0 pts/1 -bash root 2739 2736 0 pts/4 -bash root 3079 2739 0 pts/4 screen root 3081 3080 0 pts/0 /bin/bash root 3082 2198 0 pts/1 screen -x root 3083 2169 0 pts/2 screen -x root 10278 3081 0 pts/0 script -f -c l3script -q /root/.lilalo//129702 root 10319 10278 0 pts/0 script -f -c l3script -q /root/.lilalo//129702 root 10320 10319 0 pts/3 l3script root 13081 13079 0 pts/5 -bash root 13203 10320 0 pts/3 ps o user,pid,ppid,ni,tty,cmd |
|
#ps l
ERROR: Conflicting format options. ********* 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 |
|
#^C
|
|
#unalias ps
|
|
#ps
PID TTY TIME CMD 10320 pts/3 00:00:01 l3script 13236 pts/3 00:00:00 ps |
|
#ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 2084 696 ? Ss Jul29 0:04 init [2] root 2 0.0 0.0 0 0 ? S Jul29 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? S Jul29 0:01 [ksoftirqd/0] root 5 0.0 0.0 0 0 ? S Jul29 0:00 [kworker/u:0] root 6 0.0 0.0 0 0 ? S Jul29 0:00 [migration/0] root 7 0.0 0.0 0 0 ? S Jul29 0:03 [watchdog/0] root 8 0.0 0.0 0 0 ? S< Jul29 0:00 [cpuset] root 9 0.0 0.0 0 0 ? S< Jul29 0:00 [khelper] root 10 0.0 0.0 0 0 ? S< Jul29 0:00 [netns] ... user 6725 0.0 1.1 11764 5956 ? Ss Jul30 0:50 l3-agent root 10278 0.0 0.1 5144 756 pts/0 S+ Jul31 0:00 script -f -c l3 root 10319 0.0 0.0 5148 416 pts/0 S+ Jul31 0:00 script -f -c l3 root 10320 0.0 0.6 7580 3252 pts/3 Ss Jul31 0:01 l3script root 13079 0.0 0.5 8524 2948 ? Ss 14:28 0:00 sshd: root@pts/ root 13081 0.0 0.5 7420 2988 pts/5 Ss 14:28 0:00 -bash user 13107 0.0 0.2 5700 1140 pts/5 S 14:29 0:00 su user - user 13108 0.0 1.0 9652 5220 pts/5 S 14:29 0:00 bash - user 13131 0.0 0.0 4928 504 pts/5 S+ 14:29 0:00 sleep 5000 root 13244 0.0 0.2 5624 1052 pts/3 R+ 14:35 0:00 ps aux |
|
#ps alx
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 1 0 20 0 2084 696 - Ss ? 0:04 init [2] 1 0 2 0 20 0 0 0 - S ? 0:00 [kthreadd] 1 0 3 2 20 0 0 0 - S ? 0:01 [ksoftirqd] 1 0 5 2 20 0 0 0 - S ? 0:00 [kworker/u] 1 0 6 2 -100 - 0 0 - S ? 0:00 [migration] 5 0 7 2 -100 - 0 0 - S ? 0:03 [watchdog/] 1 0 8 2 0 -20 0 0 - S< ? 0:00 [cpuset] 1 0 9 2 0 -20 0 0 - S< ? 0:00 [khelper] 1 0 10 2 0 -20 0 0 - S< ? 0:00 [netns] ... 1 1000 6725 1 20 0 11764 5956 - Ss ? 0:50 l3-agent 0 0 10278 3081 20 0 5144 756 - S+ pts/0 0:00 script -f - 1 0 10319 10278 20 0 5148 416 - S+ pts/0 0:00 script -f - 4 0 10320 10319 20 0 7580 3252 - Ss pts/3 0:01 l3script 4 0 13079 1704 20 0 8524 2948 - Ss ? 0:00 sshd: root@ 4 0 13081 13079 20 0 7420 2988 - Ss pts/5 0:00 -bash 4 1000 13107 13081 20 0 5700 1140 - S pts/5 0:00 su user - 0 1000 13108 13107 20 0 9652 5220 - S pts/5 0:00 bash - 0 1000 13131 13108 20 0 4928 504 - S+ pts/5 0:00 sleep 5000 4 0 13252 10320 20 0 5412 688 - R+ pts/3 0:00 ps alx |
|
#ps aux|bash
bash: line 1: USER: команда не найдена bash: line 2: root: команда не найдена bash: line 3: root: команда не найдена bash: line 4: root: команда не найдена bash: line 5: root: команда не найдена bash: line 6: root: команда не найдена bash: line 7: root: команда не найдена bash: line 8: Jul29: Нет такого файла или каталога bash: line 9: Jul29: Нет такого файла или каталога bash: line 10: Jul29: Нет такого файла или каталога ... bash: line 53: root: команда не найдена bash: line 54: root: команда не найдена bash: line 55: root: команда не найдена bash: line 56: root: команда не найдена bash: line 57: root: команда не найдена bash: line 58: root: команда не найдена bash: line 59: root: команда не найдена bash: line 60: root: команда не найдена bash: line 61: syntax error near unexpected token `(' bash: line 61: `proxy 5318 0.0 2.4 37224 12772 ? S Jul30 0:24 (squid) -YC -f /etc/squid3/squid.conf' |
|
#ps aux|grep bash
root 2169 0.0 0.5 7412 2984 pts/2 Ss Jul29 0:00 -bash root 2198 0.0 0.5 7412 2980 pts/1 Ss Jul29 0:00 -bash root 2739 0.0 0.5 7412 2980 pts/4 Ss Jul29 0:00 -bash root 3081 0.0 0.3 6276 1808 pts/0 Ss Jul30 0:00 /bin/bash root 13081 0.0 0.5 7420 2988 pts/5 Ss 14:28 0:00 -bash user 13108 0.0 1.0 9652 5220 pts/5 S 14:29 0:00 bash - root 13330 0.0 0.1 5080 736 pts/3 S+ 14:35 0:00 grep bash |
|
#ps aux|egrep '^*.Z*.$'
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 2084 696 ? Ss Jul29 0:04 init [2] root 2 0.0 0.0 0 0 ? S Jul29 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? S Jul29 0:01 [ksoftirqd/0] root 5 0.0 0.0 0 0 ? S Jul29 0:00 [kworker/u:0] root 6 0.0 0.0 0 0 ? S Jul29 0:00 [migration/0] root 7 0.0 0.0 0 0 ? S Jul29 0:03 [watchdog/0] root 8 0.0 0.0 0 0 ? S< Jul29 0:00 [cpuset] root 9 0.0 0.0 0 0 ? S< Jul29 0:00 [khelper] root 10 0.0 0.0 0 0 ? S< Jul29 0:00 [netns] ... root 10278 0.0 0.1 5144 756 pts/0 S+ Jul31 0:00 script -f -c l3script -q /root/.lilalo//1297024767109389329-1375268674.script root 10319 0.0 0.0 5148 416 pts/0 S+ Jul31 0:00 script -f -c l3script -q /root/.lilalo//1297024767109389329-1375268674.script root 10320 0.0 0.6 7580 3256 pts/3 Ss Jul31 0:01 l3script root 13079 0.0 0.5 8524 2948 ? Ss 14:28 0:00 sshd: root@pts/5 root 13081 0.0 0.5 7420 2988 pts/5 Ss 14:28 0:00 -bash user 13107 0.0 0.2 5700 1140 pts/5 S 14:29 0:00 su user - user 13108 0.0 1.0 9652 5220 pts/5 S 14:29 0:00 bash - user 13131 0.0 0.0 4928 504 pts/5 S+ 14:29 0:00 sleep 5000 root 13338 0.0 0.2 5624 1052 pts/3 R+ 14:36 0:00 ps aux root 13339 0.0 0.1 5076 732 pts/3 R+ 14:36 0:00 egrep ^*.Z*.$ |
|
#ps aux|awk { print $8; };
l3script: syntax error near unexpected token `}' |
|
#ps aux|awk '{ print $8; };'|grep Z
|
|
#ps aux|awk '{ print $8; };'|grep R
R+ |
|
#ps aux|awk '{ print $2,$8; };'|grep R
13383 R+ |
|
#ps aux|awk '{ print $2,$8; };'|grep R|awk '{ print $1; };'
13393 |
|
#top
top - 14:41:46 up 3 days, 5:48, 3 users, load average: 0.00, 0.01, 0.05
Tasks: 71 total, 1 running, 70 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2%us, 0.2%sy, 0.0%ni, 98.8%id, 0.8%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 513668k total, 506252k used, 7416k free, 189272k buffers
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
Swap: 0k total, 0k used, 0k free, 204432k cached
3080 root 20 0 6500 1508 956 S 0.3 0.3 0:11.88 screen
1 root 20 0 2084 696 604 S 0.0 0.1 0:04.91 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:01.12 ksoftirqd/0
...
9 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper
10 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 xenwatch
12 root 20 0 0 0 0 S 0.0 0.0 0:00.01 xenbus
13 root 20 0 0 0 0 S 0.0 0.0 0:00.64 sync_supers
14 root 20 0 0 0 0 S 0.0 0.0 0:00.01 bdi-default
15 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kintegrityd
16 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd
16 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd
17 root 20 0 0 0 0 S 0.0 0.0 0:04.13 kworker/0:1
|
|
#ssh root@195.182.202.50
top - 14:44:27 up 29 days, 2:57, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 133 total, 1 running, 132 sleeping, 0 stopped, 0 zombie
Cpu0 : 0.3%us, 0.0%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.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
1 root 20 0 2036 716 620 S 0 0.0 0:08.32 init
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
Mem: 2073056k total, 1958888k used, 114168k free, 349828k buffers
...
3 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/0
4 root 20 0 0 0 0 S 0 0.0 0:00.66 ksoftirqd/0
5 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/0
www:~# exit RT 0 0 0 0 S 0 0.0 0:00.08 migration/1
logoutroot 20 0 0 0 0 S 0 0.0 0:00.70 ksoftirqd/1
Connection to 195.182.202.50 closed. 0 S 0 0.0 0:00.00 watchdog/1
9 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/2
10 root 20 0 0 0 0 S 0 0.0 0:02.78 ksoftirqd/2
11 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/2
12 root RT 0 0 0 0 S 0 0.0 0:00.05 migration/3
|
|
#top -d 1.0
top - 14:48:34 up 3 days, 5:55, 3 users, load average: 1.13, 0.63, 0.28
Tasks: 71 total, 2 running, 69 sleeping, 0 stopped, 0 zombie
Cpu(s): 98.1%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 1.0%si, 1.0%st
Mem: 513668k total, 506476k used, 7192k free, 185040k buffers
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
Swap: 0k total, 0k used, 0k free, 209104k cached
1972 root 20 0 33532 27m 1532 R 98.0 5.4 30:33.34 l3-agent
1 root 20 0 2084 696 604 S 0.0 0.1 0:04.91 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:01.14 ksoftirqd/0
...
8 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 cpuset
9 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper
10 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 xenwatch
12 root 20 0 0 0 0 S 0.0 0.0 0:00.01 xenbus
13 root 20 0 0 0 0 S 0.0 0.0 0:00.64 sync_supers
14 root 20 0 0 0 0 S 0.0 0.0 0:00.01 bdi-default
15 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kintegrityd
16 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd
17 root 20 0 0 0 0 S 0.0 0.0 0:04.13 kworker/0:1
|
|
#top -d 0.1
top - 14:48:38 up 3 days, 5:55, 3 users, load average: 1.13, 0.63, 0.28
Tasks: 71 total, 2 running, 69 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.4%us, 0.0%sy, 0.0%ni, 99.5%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 513668k total, 506476k used, 7192k free, 185040k buffers
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
Swap: 0k total, 0k used, 0k free, 209108k cached
1972 root 20 0 33532 27m 1532 R 99.2 5.4 30:37.35 l3-agent
1 root 20 0 2084 696 604 S 0.0 0.1 0:04.91 init
top - 14:48:38 up 3 days, 5:55, 3 users, load average: 1.12, 0.64, 0.29
Tasks: 71 total, 2 running, 69 sleeping, 0 stopped, 0 zombie
...
7 root RT 0 0 0 0 S 0.0 0.0 0:03.12 watchdog/0
8 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 cpuset
9 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper
10 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 xenwatch
12 root 20 0 0 0 0 S 0.0 0.0 0:00.01 xenbus
13 root 20 0 0 0 0 S 0.0 0.0 0:00.64 sync_supers
14 root 20 0 0 0 0 S 0.0 0.0 0:00.01 bdi-default
15 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kintegrityd
16 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd
|
|
#top -p 1
top - 14:48:52 up 3 days, 5:55, 3 users, load average: 1.10, 0.65, 0.29
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.4%us, 0.0%sy, 0.0%ni, 99.5%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 513668k total, 506472k used, 7196k free, 185040k buffers
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
Swap: 0k total, 0k used, 0k free, 209168k cached
1 root 20 0 2084 696 604 S 0.0 0.1 0:04.91 init
|
|
#echo $$
10320 |
|
#top -p 1,10320
top - 14:49:11 up 3 days, 5:56, 3 users, load average: 1.07, 0.67, 0.31
Tasks: 2 total, 0 running, 2 sleeping, 0 stopped, 0 zombie
Cpu(s): 99.3%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.7%st
Mem: 513668k total, 506456k used, 7212k free, 185040k buffers
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
Swap: 0k total, 0k used, 0k free, 209168k cached
1 root 20 0 2084 696 604 S 0.0 0.1 0:04.91 init
10320 root 20 0 7580 3256 1600 S 0.0 0.6 0:01.99 l3script
|
|
#top -p `ps t pts/5|awk '{ print $1; };'`
top: bad pid 'PID'
|
|
#ps t pts/5|awk '{ print $1; };'|grep -v PID
13081 13107 13108 13131 |
|
#top -b
top - 14:53:03 up 3 days, 5:59, 3 users, load average: 0.28, 0.45, 0.30
Tasks: 71 total, 1 running, 70 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.4%us, 0.0%sy, 0.0%ni, 99.5%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 513668k total, 506940k used, 6728k free, 185116k buffers
Swap: 0k total, 0k used, 0k free, 209500k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 2084 696 604 S 0.0 0.1 0:04.91 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:01.14 ksoftirqd/0
5 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u:0
...
10278 root 20 0 5144 756 632 S 0.0 0.1 0:00.38 script
10319 root 20 0 5148 416 292 S 0.0 0.1 0:02.91 script
10320 root 20 0 7580 3256 1600 S 0.0 0.6 0:02.28 l3script
13079 root 20 0 8524 2948 2328 S 0.0 0.6 0:00.13 sshd
13081 root 20 0 7420 2988 1496 S 0.0 0.6 0:00.17 bash
13107 user 20 0 5700 1140 928 S 0.0 0.2 0:00.00 su
13108 user 20 0 9652 5220 1496 S 0.0 1.0 0:00.34 bash
13611 user 20 0 4928 504 448 S 0.0 0.1 0:00.00 sleep
13634 root 20 0 2388 1040 812 R 0.0 0.2 0:00.00 top
^C
|
|
#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 |
|
#sleep 5000 &
[1] 13650 |
|
#sleep 5001 &
[2] 13658 |
|
#sleep 5002 &
[3] 13666 |
|
#sleep 5003 &
[4] 13674 |
|
#sleep 5004 &
[5] 13682 |
|
#ps aux|grep sleep
user 13611 0.0 0.0 4928 504 pts/5 S+ 14:52 0:00 sleep 5000 root 13650 0.0 0.0 4928 504 pts/3 S 14:56 0:00 sleep 5000 root 13658 0.0 0.0 4928 504 pts/3 S 14:56 0:00 sleep 5001 root 13666 0.0 0.0 4928 504 pts/3 S 14:56 0:00 sleep 5002 root 13674 0.0 0.0 4928 504 pts/3 S 14:56 0:00 sleep 5003 root 13682 0.0 0.0 4928 504 pts/3 S 14:56 0:00 sleep 5004 root 13691 0.0 0.1 5076 736 pts/3 S+ 14:56 0:00 grep sleep |
|
#kill -9 13611
|
|
#jobs
[1] Running sleep 5000 & [2] Running sleep 5001 & [3] Running sleep 5002 & [4]- Running sleep 5003 & [5]+ Running sleep 5004 & |
|
#fg 1
sleep 5000 ^Z [1]+ Stopped sleep 5000 |
|
#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 |
|
#ps aux|grep sleep
root 13650 0.0 0.0 4928 504 pts/3 T 14:56 0:00 sleep 5000 root 13658 0.0 0.0 4928 504 pts/3 S 14:56 0:00 sleep 5001 root 13666 0.0 0.0 4928 504 pts/3 S 14:56 0:00 sleep 5002 root 13674 0.0 0.0 4928 504 pts/3 S 14:56 0:00 sleep 5003 root 13682 0.0 0.0 4928 504 pts/3 S 14:56 0:00 sleep 5004 root 13728 0.0 0.1 5076 736 pts/3 S+ 14:57 0:00 grep sleep |
|
#kill -18 13650
|
| Время первой команды журнала | 16:04:26 2013- 7-31 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Время последней команды журнала | 13:57:31 2013- 8- 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Процент команд с ненулевым кодом завершения, % | 13.86 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Процент синтаксически неверно набранных команд, % | 1.98 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Суммарное время работы с терминалом *, час | 1.53 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Количество командных строк в единицу времени, команда/мин | 1.10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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
|