/l3/users/27-3-2017/NT-Ladm/debian5.net.nt/root :1 :2 :3 :4 |
|
#> public/f1
|
#chmod +t public/
|
#privet
![]() l3script: privet: команда не найдена |
#privet
![]() l3script: privet: команда не найдена |
#pwd
/opt |
#mkdir project
|
#ls
project public |
#ls -l
итого 8 drwxr-xr-x 2 root root 4096 Мар 30 12:08 project drwxr-xrwt 2 root root 4096 Мар 30 11:52 public |
#chgrp developers project
|
#chmod 770 project/
|
#ls -l
итого 8 drwxrwx--- 2 root developers 4096 Мар 30 12:08 project drwxr-xrwt 2 root root 4096 Мар 30 11:52 public |
#chmod g+s project/
|
#find / -perm -4000 2> /dev/null
![]() /usr/lib/openssh/ssh-keysign /usr/lib/pt_chown /usr/lib/eject/dmcrypt-get-device /usr/bin/passwd /usr/bin/chfn /usr/bin/gpasswd /usr/bin/chsh /usr/bin/newgrp /usr/sbin/exim4 /bin/mount /bin/su /bin/ping6 /bin/umount /bin/ping |
#ping football.ua
PING football.ua (193.29.200.134) 56(84) bytes of data. 64 bytes from 193.29.200.134: icmp_req=1 ttl=59 time=1.65 ms 64 bytes from 193.29.200.134: icmp_req=2 ttl=59 time=1.76 ms 64 bytes from 193.29.200.134: icmp_req=3 ttl=59 time=12.5 ms 64 bytes from 193.29.200.134: icmp_req=4 ttl=59 time=1.55 ms 64 bytes from 193.29.200.134: icmp_req=5 ttl=59 time=1.96 ms 64 bytes from 193.29.200.134: icmp_req=6 ttl=59 time=4.03 ms 64 bytes from 193.29.200.134: icmp_req=7 ttl=59 time=1.57 ms 64 bytes from 193.29.200.134: icmp_req=8 ttl=59 time=1.50 ms 64 bytes from 193.29.200.134: icmp_req=9 ttl=59 time=1.63 ms 64 bytes from 193.29.200.134: icmp_req=10 ttl=59 time=1.68 ms 64 bytes from 193.29.200.134: icmp_req=12 ttl=59 time=1.56 ms 64 bytes from 193.29.200.134: icmp_req=13 ttl=59 time=1.54 ms 64 bytes from 193.29.200.134: icmp_req=14 ttl=59 time=1.50 ms 64 bytes from 193.29.200.134: icmp_req=15 ttl=59 time=1.55 ms 64 bytes from 193.29.200.134: icmp_req=16 ttl=59 time=1.50 ms ^C --- football.ua ping statistics --- 16 packets transmitted, 15 received, 6% packet loss, time 30437ms rtt min/avg/max/mdev = 1.501/2.506/12.536/2.749 ms |
#cd
|
#m
![]() mail man md5sum.textutils mkfs.cramfs mklost+found more mail-lock mandb mesg mkfs.ext2 mk_modmap mount mailq manpath mii-tool mkfs.ext3 mknod mountpoint mail-touchlock mapfile mkdir mkfs.ext4 mkswap mt mail-unlock mapscrn mke2fs mkfs.ext4dev mktemp mt-gnu mailx mawk mkfifo mkfs.minix mkvgafont mtrace make mcookie mkfs mkhomedir_helper modinfo mv makeacm md5sum mkfs.bfs mkinitramfs modprobe |
#~
![]() l3script: /root: Это каталог |
#cd ~
|
#cat ~/mymotd
![]() cat: /root/mymotd: Нет такого файла или каталога |
#cp ~/mymotd /etc/motd
![]() cp: не удалось выполнить stat для «/root/mymotd»: Нет такого файла или каталога |
#touch ~./hushlogin
![]() touch: невозможно выполнить touch для «~./hushlogin»: Нет такого файла или каталога |
#vi mymont
--- /tmp/l3-saved-24065.8575.16552 2017-03-30 12:40:40.329109471 +0300 +++ mymont 2017-03-30 12:40:52.389099809 +0300 @@ -0,0 +1 @@ +privet jeka |
#cp mymotd /etc/motd
![]() cp: не удалось выполнить stat для «mymotd»: Нет такого файла или каталога |
#cp ~/mymotd /etc/motd
![]() cp: не удалось выполнить stat для «/root/mymotd»: Нет такого файла или каталога |
#ls
d1 d2 d3 f1 f2 install mymont proc.txt scripts |
#cp ~/mymont /etc/motd
|
#touch .hushlogin
|
#cd
|
#ls
d1 d2 d3 f1 f2 hushlogin install mymont proc.txt scripts |
#ls -l
итого 44 drwxr-xr-x 4 root root 4096 Мар 27 14:12 d1 drwxr-xr-x 2 root root 4096 Мар 27 14:20 d2 drwxr-xr-x 3 root root 4096 Мар 27 14:12 d3 -rw-r--r-- 2 root root 4096 Мар 27 14:26 f1 -rw-r--r-- 2 root root 4096 Мар 27 14:26 f2 -rw-r--r-- 1 root root 0 Мар 30 12:42 hushlogin -rw-r--r-- 1 root root 5268 Мар 27 17:33 install -rw-r--r-- 1 root root 12 Мар 30 12:40 mymont -rw-r--r-- 1 root root 4932 Мар 27 17:26 proc.txt drwxr-xr-x 2 root root 4096 Мар 29 15:49 scripts |
#cat mynologin
![]() cat: mynologin: Нет такого файла или каталога |
#cat /mynologin
![]() cat: /mynologin: Нет такого файла или каталога |
#cat ~/mynologin
![]() cat: /root/mynologin: Нет такого файла или каталога |
#cd//
![]() l3script: cd//: Нет такого файла или каталога |
#cd ..
|
#ls
bin dev home lib lib64 media opt root sbin srv tmp var boot etc initrd.img lib32 lost+found mnt proc run selinux sys usr vmlinuz |
#passwd
![]() Введите новый пароль UNIX: Повторите ввод нового пароля UNIX: Пароль не указан Введите новый пароль UNIX: Повторите ввод нового пароля UNIX: Пароль не указан Введите новый пароль UNIX: Повторите ввод нового пароля UNIX: Sorry, passwords do not match passwd: Ошибка при операциях с маркером проверки подлинности passwd: пароль не изменён |
#passwd user
![]() Введите новый пароль UNIX: Повторите ввод нового пароля UNIX: Sorry, passwords do not match passwd: Ошибка при операциях с маркером проверки подлинности passwd: пароль не изменён |
#cd
![]() bin/ etc/ lib/ lost+found/ opt/ run/ srv/ usr/ boot/ home/ lib32/ media/ proc/ sbin/ sys/ var/ dev/ initrd.img lib64/ mnt/ root/ selinux/ tmp/ vmlinuz |
#cd
![]() bin/ etc/ lib/ lost+found/ opt/ run/ srv/ usr/ boot/ home/ lib32/ media/ proc/ sbin/ sys/ var/ dev/ initrd.img lib64/ mnt/ root/ selinux/ tmp/ vmlinuz |
#~
![]() l3script: /root: Это каталог |
#cd ~
|
#ls
d1 d2 d3 f1 f2 hushlogin install mymont proc.txt scripts |
#ls
d1 d2 d3 f1 f2 hushlogin install mymont proc.txt scripts |
#cd ..
|
#ls
bin dev home lib lib64 media opt root sbin srv tmp var boot etc initrd.img lib32 lost+found mnt proc run selinux sys usr vmlinuz |
#cd files
![]() l3script: cd: files: Нет такого файла или каталога |
#cd usr
|
#ls
bin games include lib lib32 local sbin share src |
#cd /opt/
|
#ls
project public |
#cd //
|
#cd ..
|
#ls
bin dev home lib lib64 media opt root sbin srv tmp var boot etc initrd.img lib32 lost+found mnt proc run selinux sys usr vmlinuz |
#cd dev
|
#ls
autofs hpet mcelog rtc0 tty12 tty26 tty4 tty53 ttyS0 vcsa2 block input mem sg0 tty13 tty27 tty40 tty54 ttyS1 vcsa3 bsg kmsg net shm tty14 tty28 tty41 tty55 ttyS2 vcsa4 btrfs-control log network_latency snapshot tty15 tty29 tty42 tty56 ttyS3 vcsa5 cdrom1 loop0 network_throughput snd tty16 tty3 tty43 tty57 uinput vcsa6 char loop1 null sndstat tty17 tty30 tty44 tty58 urandom vga_arbiter console loop2 oldmem sr0 tty18 tty31 tty45 tty59 vcs xconsole core loop3 port stderr tty19 tty32 tty46 tty6 vcs1 xvda cpu loop4 ppp stdin tty2 tty33 tty47 tty60 vcs2 xvda1 cpu_dma_latency loop5 psaux stdout tty20 tty34 tty48 tty61 vcs3 xvdb disk loop6 ptmx tty tty21 tty35 tty49 tty62 vcs4 zero dvd1 loop7 pts tty0 tty22 tty36 tty5 tty63 vcs5 fd loop-control random tty1 tty23 tty37 tty50 tty7 vcs6 full MAKEDEV root tty10 tty24 tty38 tty51 tty8 vcsa fuse mapper rtc tty11 tty25 tty39 tty52 tty9 vcsa1 |
#cd ..
|
#cd tmp/
|
#ls
no_file_with_this_name |
#cd ~user/files
![]() l3script: cd: /home/user/files: Нет такого файла или каталога |
#ls
no_file_with_this_name |
#cd ..
|
#cd ~user/files
![]() l3script: cd: /home/user/files: Нет такого файла или каталога |
#cat /etc/fstab
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # 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). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/xvda1 during installation UUID=92b79496-a6c3-450d-a438-766caa8504d8 / ext4 errors=remount-ro 0 1 # swap was on /dev/xvda5 during installation UUID=c74f7f49-4c6d-4208-81f6-14356114f2e0 none swap sw 0 0 /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0 |
#cat /proc/sys/kernel/pid_max
32768 |
#cat /etc/sysctl.conf
# # /etc/sysctl.conf - Configuration file for setting system variables # See /etc/sysctl.d/ for additonal system variables # See sysctl.conf (5) for information. # #kernel.domainname = example.com # Uncomment the following to stop low-level messages on console #kernel.printk = 3 4 1 3 ##############################################################3 # Functions previously found in netbase ... # Do not send ICMP redirects (we are not a router) #net.ipv4.conf.all.send_redirects = 0 # # Do not accept IP source route packets (we are not a router) #net.ipv4.conf.all.accept_source_route = 0 #net.ipv6.conf.all.accept_source_route = 0 # # Log Martian Packets #net.ipv4.conf.all.log_martians = 1 # |
#pstree
init─┬─acpid ├─cron ├─exim4 ├─6*[getty] ├─2*[l3-agent] ├─rsyslogd───3*[{rsyslogd}] ├─script───l3script ├─sshd───sshd───bash───script───script───l3script───pstree └─udevd |
#echo $$
25830 |
#bash
root@debian5:~# pstree init─┬─acpid ├─cron ├─exim4 ├─6*[getty] ├─2*[l3-agent] ├─rsyslogd───3*[{rsyslogd}] ├─script───l3script ├─sshd───sshd───bash───script───script───l3script───bash───pstree └─udevd root@debian5:~# l3script |
#ps l
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 2285 1 20 0 18368 972 - Ss+ tty1 0:00 /sbin/getty 38400 tty1 4 0 2286 1 20 0 18368 972 - Ss+ tty2 0:00 /sbin/getty 38400 tty2 4 0 2287 1 20 0 18368 972 - Ss+ tty3 0:00 /sbin/getty 38400 tty3 4 0 2288 1 20 0 18368 972 - Ss+ tty4 0:00 /sbin/getty 38400 tty4 4 0 2289 1 20 0 18368 972 - Ss+ tty5 0:00 /sbin/getty 38400 tty5 4 0 2290 1 20 0 18368 968 - Ss+ tty6 0:00 /sbin/getty 38400 tty6 0 0 24065 24064 20 0 21864 2436 - Ss+ pts/1 0:00 l3script 4 0 25956 25954 20 0 22112 2804 - Ss pts/2 0:00 -bash 0 0 26001 25956 20 0 18164 840 - S+ pts/2 0:00 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script 1 0 26032 26001 20 0 18168 468 - S+ pts/2 0:00 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script 0 0 26033 26032 20 0 21648 2260 - Ss pts/3 0:00 l3script 4 0 26062 26033 20 0 10536 840 - R+ pts/3 0:00 ps l |
#ps -l
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 0 S 0 26033 26032 0 80 0 - 5412 - pts/3 00:00:00 l3script 4 R 0 26070 26033 0 80 0 - 2634 - pts/3 00:00:00 ps |
#ps la
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 2285 1 20 0 18368 972 - Ss+ tty1 0:00 /sbin/getty 38400 tty1 4 0 2286 1 20 0 18368 972 - Ss+ tty2 0:00 /sbin/getty 38400 tty2 4 0 2287 1 20 0 18368 972 - Ss+ tty3 0:00 /sbin/getty 38400 tty3 4 0 2288 1 20 0 18368 972 - Ss+ tty4 0:00 /sbin/getty 38400 tty4 4 0 2289 1 20 0 18368 972 - Ss+ tty5 0:00 /sbin/getty 38400 tty5 4 0 2290 1 20 0 18368 968 - Ss+ tty6 0:00 /sbin/getty 38400 tty6 0 0 24065 24064 20 0 21864 2436 - Ss+ pts/1 0:00 l3script 4 0 25956 25954 20 0 22112 2804 - Ss pts/2 0:00 -bash 0 0 26001 25956 20 0 18164 840 - S+ pts/2 0:00 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script 1 0 26032 26001 20 0 18168 468 - S+ pts/2 0:00 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script 0 0 26033 26032 20 0 21648 2260 - Ss pts/3 0:00 l3script 4 0 26078 26033 20 0 10536 836 - R+ pts/3 0:00 ps la |
#ps lax
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 1 0 20 0 10648 832 - Ss ? 0:09 init [2] 1 0 2 0 20 0 0 0 - S ? 0:00 [kthreadd] 1 0 3 2 20 0 0 0 - S ? 0:02 [ksoftirqd/0] 1 0 5 2 20 0 0 0 - S ? 0:00 [kworker/u:0] 1 0 6 2 -100 - 0 0 - S ? 0:00 [migration/0] 5 0 7 2 -100 - 0 0 - S ? 0:05 [watchdog/0] 1 0 8 2 0 -20 0 0 - S< ? 0:00 [cpuset] 1 0 9 2 0 -20 0 0 - S< ? 0:00 [khelper] 5 0 10 2 20 0 0 0 - S ? 0:00 [kdevtmpfs] ... 1 0 4670 2 20 0 0 0 - S ? 0:03 [kworker/0:2] 1 1000 5635 1 20 0 39544 7844 - Ss ? 1:02 l3-agent 1 0 24064 1 20 0 18168 472 - S ? 0:00 script -f -c l3script -q /root/.lilalo//29282122481106228832-1490856039.script 0 0 24065 24064 20 0 21864 2436 - Ss+ pts/1 0:00 l3script 4 0 25954 2261 20 0 71288 3680 - Ss ? 0:00 sshd: root@pts/2 4 0 25956 25954 20 0 22112 2804 - Ss pts/2 0:00 -bash 0 0 26001 25956 20 0 18164 840 - S+ pts/2 0:00 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script 1 0 26032 26001 20 0 18168 468 - S+ pts/2 0:00 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script 0 0 26033 26032 20 0 21648 2260 - Ss pts/3 0:00 l3script 4 0 26086 26033 20 0 10536 840 - R+ pts/3 0:00 ps lax |
#ps uax
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 10648 832 ? Ss Мар24 0:09 init [2] root 2 0.0 0.0 0 0 ? S Мар24 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? S Мар24 0:02 [ksoftirqd/0] root 5 0.0 0.0 0 0 ? S Мар24 0:00 [kworker/u:0] root 6 0.0 0.0 0 0 ? S Мар24 0:00 [migration/0] root 7 0.0 0.0 0 0 ? S Мар24 0:05 [watchdog/0] root 8 0.0 0.0 0 0 ? S< Мар24 0:00 [cpuset] root 9 0.0 0.0 0 0 ? S< Мар24 0:00 [khelper] root 10 0.0 0.0 0 0 ? S Мар24 0:00 [kdevtmpfs] ... root 4670 0.0 0.0 0 0 ? S Мар27 0:03 [kworker/0:2] user 5635 0.0 1.5 39544 7844 ? Ss Мар27 1:02 l3-agent root 24064 0.0 0.0 18168 472 ? S Мар30 0:00 script -f -c l3script -q /root/.lilalo//29282122481106228832-1490856039.script root 24065 0.0 0.4 21864 2436 pts/1 Ss+ Мар30 0:00 l3script root 25954 0.0 0.7 71288 3680 ? Ss 09:36 0:00 sshd: root@pts/2 root 25956 0.0 0.5 22112 2804 pts/2 Ss 09:36 0:00 -bash root 26001 0.0 0.1 18164 840 pts/2 S+ 09:36 0:00 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script root 26032 0.0 0.0 18168 468 pts/2 S+ 09:36 0:00 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script root 26033 0.0 0.4 21648 2260 pts/3 Ss 09:36 0:00 l3script root 26096 0.0 0.2 18948 1260 pts/3 R+ 09:47 0:00 ps uax |
#ps -o "%u %y %a"
RUSER TTY COMMAND root pts/3 l3script root pts/3 ps -o %u %y %a |
#ps -o "%u %y %a" ax
RUSER TTY COMMAND root ? init [2] root ? [kthreadd] root ? [ksoftirqd/0] root ? [kworker/u:0] root ? [migration/0] root ? [watchdog/0] root ? [cpuset] root ? [khelper] root ? [kdevtmpfs] ... root ? [kworker/0:2] user ? l3-agent root ? script -f -c l3script -q /root/.lilalo//29282122481106228832-1490856039.script root pts/1 l3script root ? sshd: root@pts/2 root pts/2 -bash root pts/2 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script root pts/2 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script root pts/3 l3script root pts/3 ps -o %u %y %a ax |
#ps -o "%U %u %y %a" ax
USER RUSER TTY COMMAND root root ? init [2] root root ? [kthreadd] root root ? [ksoftirqd/0] root root ? [kworker/u:0] root root ? [migration/0] root root ? [watchdog/0] root root ? [cpuset] root root ? [khelper] root root ? [kdevtmpfs] ... root root ? [kworker/0:2] user user ? l3-agent root root ? script -f -c l3script -q /root/.lilalo//29282122481106228832-1490856039.script root root pts/1 l3script root root ? sshd: root@pts/2 root root pts/2 -bash root root pts/2 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script root root pts/2 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script root root pts/3 l3script root root pts/3 ps -o %U %u %y %a ax |
#top
top - 09:58:42 up 6 days, 16:11, 1 user, load average: 0,00, 0,01, 0,05 Tasks: 53 total, 1 running, 52 sleeping, 0 stopped, 0 zombie %Cpu(s): 0,0 us, 0,3 sy, 0,0 ni, 98,7 id, 1,0 wa, 0,0 hi, 0,0 si, 0,0 st KiB Mem: 507368 total, 434604 used, 72764 free, 140656 buffers KiB Swap: 0 total, 0 used, 0 free, 191312 cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 25954 root 20 0 71288 3680 2888 S 0,3 0,7 0:00.06 sshd 26032 root 20 0 18168 468 308 S 0,3 0,1 0:00.01 script 26128 root 20 0 25292 1580 1128 R 0,3 0,3 0:00.01 top 1 root 20 0 10648 832 696 S 0,0 0,2 0:09.31 init ... 3380 root 20 0 52908 14m 1648 R 99,9 3,0 11:14.37 l3-agent 26032 root 20 0 18168 468 308 S 0,3 0,1 0:00.69 script 26128 root 20 0 25292 1580 1128 R 0,3 0,3 0:01.08 top 5635 user 20 0 39544 7844 1040 S 0,0 1,5 1:02.80 l3-agent 24064 root 20 0 18168 472 308 S 0,0 0,1 0:00.09 script 24065 root 20 0 21864 2436 1764 S 0,0 0,5 0:00.51 l3script 25954 root 20 0 71288 3680 2888 S 0,0 0,7 0:01.03 sshd 25956 root 20 0 22112 2804 1720 S 0,0 0,6 0:00.04 bash 26001 root 20 0 18164 840 688 S 0,0 0,2 0:00.02 script 26033 root 20 0 21648 2260 1624 S 0,0 0,4 0:00.10 l3script |
#htop
![]() l3script: htop: команда не найдена |
#free
total used free shared buffers cached Mem: 507368 437696 69672 0 140668 194468 -/+ buffers/cache: 102560 404808 Swap: 0 0 0 |
#fuser
![]() Не указан процесс Usage: fuser [-fMuvw] [-a|-s] [-4|-6] [-c|-m|-n SPACE] [-k [-i] [-SIGNAL]] NAME... fuser -l fuser -V Show which processes use the named files, sockets, or filesystems. -a,--all display unused files too -i,--interactive ask before killing (ignored without -k) -k,--kill kill processes accessing the named file -l,--list-signals list available signal names -m,--mount show all processes using the named filesystems or block device ... -s,--silent silent operation -SIGNAL send this signal instead of SIGKILL -u,--user display user IDs -v,--verbose verbose output -w,--writeonly kill only processes with write access -V,--version display version information -4,--ipv4 поиск только среди сокетов IPv4 -6,--ipv6 поиск только среди сокетов IPv6 - отменить предыдущие параметры Имена udp/tcp: [локальный_порт][,[удалённый_узел][,[удалённый_порт]]] |
#apt-get install htop
Чтение списков пакетов… Готово Построение дерева зависимостей Чтение информации о состоянии… Готово Предлагаемые пакеты: strace ltrace НОВЫЕ пакеты, которые будут установлены: htop обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 91 пакетов не обновлено. Необходимо скачать 74,9 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 216 kB. Получено:1 http://ftp.ua.debian.org/debian/ wheezy/main htop amd64 1.0.1-1 [74,9 kB] Получено 74,9 kБ за 0с (1 403 kБ/c) Выбор ранее не выбранного пакета htop. (Чтение базы данных … на данный момент установлено 28878 файлов и каталогов.) Распаковывается пакет htop (из файла …/htop_1.0.1-1_amd64.deb) … Обрабатываются триггеры для man-db … Настраивается пакет htop (1.0.1-1) … |
#htop
|
# Mem[||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 102/495MB] Load average: 0.53 0.58 0.33
Файловая система 1K-блоков Использовано Доступно Использовано% Cмонтировано в rootfs 15791024 1052096 13936780 8% / udev 10240 0 10240 0% /dev tmpfs 50740 152 50588 1% /run /dev/disk/by-uuid/92b79496-a6c3-450d-a438-766caa8504d8 15791024 1052096 13936780 8% / tmpfs 5120 0 5120 0% /run/lock tmpfs 101460 0 101460 0% /run/shm |
#fuser -v /home
![]() |
#cd ~ivan/
|
#cd ..
|
#~
![]() l3script: /root: Это каталог |
#cd ~
|
#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 |
#netstat -tan | grep 22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 64 192.168.13.5:22 192.168.16.147:49234 ESTABLISHED tcp6 0 0 :::22 :::* LISTEN |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3e:00:00:05 inet addr:192.168.13.5 Bcast:192.168.13.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe00:5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:93942 errors:0 dropped:0 overruns:0 frame:0 TX packets:96387 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:33814735 (32.2 MiB) TX bytes:18499425 (17.6 MiB) Interrupt:72 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:15 errors:0 dropped:0 overruns:0 frame:0 TX packets:15 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3522 (3.4 KiB) TX bytes:3522 (3.4 KiB) |
#pstree -p
init(1)─┬─acpid(1913) ├─cron(1955) ├─exim4(2228) ├─getty(2285) ├─getty(2286) ├─getty(2287) ├─getty(2288) ├─getty(2289) ├─getty(2290) ├─l3-agent(3380) ├─l3-agent(5635) ├─rsyslogd(1883)─┬─{rsyslogd}(1884) │ ├─{rsyslogd}(1886) │ └─{rsyslogd}(1887) ├─script(24064)───l3script(24065) ├─sshd(2261)───sshd(25954)───bash(25956)───script(26001)───script(26032)───l3script(26033)───pstree(26446) └─udevd(277) |
#cd ~
|
#ls
d1 d2 d3 f1 f2 hushlogin install mymont proc.txt scripts |
#cd scripts/
|
#ps
PID TTY TIME CMD 26033 pts/3 00:00:00 l3script 26483 pts/3 00:00:00 ps |
#ps lax
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 1 0 20 0 10648 832 - Ss ? 0:09 init [2] 1 0 2 0 20 0 0 0 - S ? 0:00 [kthreadd] 1 0 3 2 20 0 0 0 - S ? 0:02 [ksoftirqd/0] 1 0 5 2 20 0 0 0 - S ? 0:00 [kworker/u:0] 1 0 6 2 -100 - 0 0 - S ? 0:00 [migration/0] 5 0 7 2 -100 - 0 0 - S ? 0:05 [watchdog/0] 1 0 8 2 0 -20 0 0 - S< ? 0:00 [cpuset] 1 0 9 2 0 -20 0 0 - S< ? 0:00 [khelper] 5 0 10 2 20 0 0 0 - S ? 0:00 [kdevtmpfs] ... 1 0 4670 2 20 0 0 0 - S ? 0:03 [kworker/0:2] 1 1000 5635 1 20 0 39544 7844 - Ss ? 1:03 l3-agent 1 0 24064 1 20 0 18168 472 - S ? 0:00 script -f -c l3script -q /root/.lilalo//29282122481106228832-1490856039.script 0 0 24065 24064 20 0 21864 2436 - Ss+ pts/1 0:00 l3script 4 0 25954 2261 20 0 71288 3680 - Ss ? 0:01 sshd: root@pts/2 4 0 25956 25954 20 0 22112 2804 - Ss pts/2 0:00 -bash 0 0 26001 25956 20 0 18164 840 - S+ pts/2 0:00 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script 1 0 26032 26001 20 0 18168 468 - S+ pts/2 0:00 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script 0 0 26033 26032 20 0 21660 2360 - Ss pts/3 0:00 l3script 4 0 26491 26033 20 0 10536 844 - R+ pts/3 0:00 ps lax |
#ps -x
warning: bad ps syntax, perhaps a bogus '-'? See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ PID TTY STAT TIME COMMAND 1 ? Ss 0:09 init [2] 2 ? S 0:00 [kthreadd] 3 ? S 0:02 [ksoftirqd/0] 5 ? S 0:00 [kworker/u:0] 6 ? S 0:00 [migration/0] 7 ? S 0:05 [watchdog/0] 8 ? S< 0:00 [cpuset] ... 4440 ? S 0:12 [kworker/0:1] 4670 ? S 0:03 [kworker/0:2] 24064 ? S 0:00 script -f -c l3script -q /root/.lilalo//29282122481106228832-1490856039.script 24065 pts/1 Ss+ 0:00 l3script 25954 ? Ss 0:01 sshd: root@pts/2 25956 pts/2 Ss 0:00 -bash 26001 pts/2 S+ 0:00 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script 26032 pts/2 S+ 0:00 script -f -c l3script -q /root/.lilalo//2750232831499231167-1490942194.script 26033 pts/3 Ss 0:00 l3script 26499 pts/3 R+ 0:00 ps -x |
#ps U
![]() error: list of users must follow U Usage: ps [options] Try 'ps --help <simple|list|output|threads|misc|all>' or 'ps --help <s|l|o|t|m|a>' for additional help text. For more details see ps(1). |
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # 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). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/xvda1 during installation UUID=92b79496-a6c3-450d-a438-766caa8504d8 / ext4 errors=remount-ro 0 1 # swap was on /dev/xvda5 during installation UUID=c74f7f49-4c6d-4208-81f6-14356114f2e0 none swap sw 0 0 /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
# # /etc/sysctl.conf - Configuration file for setting system variables # See /etc/sysctl.d/ for additonal system variables # See sysctl.conf (5) for information. # #kernel.domainname = example.com # Uncomment the following to stop low-level messages on console #kernel.printk = 3 4 1 3 ##############################################################3 # Functions previously found in netbase # # Uncomment the next two lines to enable Spoof protection (reverse-path filter) # Turn on Source Address Verification in all interfaces to # prevent some spoofing attacks #net.ipv4.conf.default.rp_filter=1 #net.ipv4.conf.all.rp_filter=1 # Uncomment the next line to enable TCP/IP SYN cookies # See http://lwn.net/Articles/277146/ # Note: This may impact IPv6 TCP sessions too #net.ipv4.tcp_syncookies=1 # Uncomment the next line to enable packet forwarding for IPv4 #net.ipv4.ip_forward=1 # Uncomment the next line to enable packet forwarding for IPv6 # Enabling this option disables Stateless Address Autoconfiguration # based on Router Advertisements for this host #net.ipv6.conf.all.forwarding=1 ################################################################### # Additional settings - these settings can improve the network # security of the host and prevent against some network attacks # including spoofing attacks and man in the middle attacks through # redirection. Some network environments, however, require that these # settings are disabled so review and enable them as needed. # # Do not accept ICMP redirects (prevent MITM attacks) #net.ipv4.conf.all.accept_redirects = 0 #net.ipv6.conf.all.accept_redirects = 0 # _or_ # Accept ICMP redirects only for gateways listed in our default # gateway list (enabled by default) # net.ipv4.conf.all.secure_redirects = 1 # # Do not send ICMP redirects (we are not a router) #net.ipv4.conf.all.send_redirects = 0 # # Do not accept IP source route packets (we are not a router) #net.ipv4.conf.all.accept_source_route = 0 #net.ipv6.conf.all.accept_source_route = 0 # # Log Martian Packets #net.ipv4.conf.all.log_martians = 1 #
32768
Время первой команды журнала | 10:52:37 2017- 3-30 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:21:34 2017- 3-31 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 21.78 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.96 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.74 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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