Журнал лабораторных работ

Содержание

Журнал

Вторник (11/28/17)

/dev/pts/2
12:49:59
#lsattr
-------------e-- ./21343553ffr
-------------e-- ./213414135
-------------e-- ./213414134543
-------------e-- ./f1
-------------e-- ./f2
-------------e-- ./f3
-------------e-- ./files.txt
-------------e-- ./f5
-------------e-- ./f4
-------------e-- ./213414shtt
-------------e-- ./2134141354112
-------------e-- ./install
12:50:49
#lsattr install
-------------e-- install
12:50:52
#cha
chage    chardet  chattr
12:50:52
#chattr +a install

12:51:50
#lsattr install
-----a-------e-- install
12:51:55
#chattr +i install

12:53:22
#lsattr install
----ia-------e-- install
12:53:26
#chattr -a install

12:53:37
#lsattr install
----i--------e-- install
12:53:40
#chattr -i install

12:54:24
#lsattr install
-------------e-- install
12:54:26
#lsattr install
-------------e-- install
12:55:35
#set +o noclobber

12:56:10
#set -o
allexport       off
braceexpand     on
emacs           on
errexit         off
errtrace        off
functrace       off
hashall         on
histexpand      on
history         on
ignoreeof       off
...
notify          off
nounset         off
onecmd          off
physical        off
pipefail        off
posix           off
privileged      off
verbose         off
vi              off
xtrace          off
12:56:20
#ps uax
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1  10648   828 ?        Ss   Ноя24   0:06 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:01 [ksoftirqd/0]
root         4  0.0  0.0      0     0 ?        S    Ноя24   0:05 [kworker/0: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:03 [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      8513  0.0  0.4  23760  2464 pts/3    Ss   10:11   0:00 l3script
root      8648  0.0  0.7  71288  3612 ?        Ss   10:19   0:00 sshd: ivan [priv]
ivan      8650  0.0  0.3  71288  1876 ?        S    10:19   0:00 sshd: ivan@pts/4
ivan      8651  0.0  0.6  22600  3200 pts/4    Ss+  10:19   0:00 -bash
root      8881  0.0  0.7  71288  3684 ?        Ss   10:59   0:00 sshd: root@pts/5
root      8883  0.0  0.5  22168  2856 pts/5    Ss   10:59   0:00 -bash
root      8928  0.0  0.1  18164   844 pts/5    S+   10:59   0:00 script -f -c l3script -q /root/.lilalo//29049243502523315683-1511859599.script
root      8959  0.0  0.0  18168   468 pts/5    S+   10:59   0:00 script -f -c l3script -q /root/.lilalo//29049243502523315683-1511859599.script
root      8960  0.0  0.4  21640  2296 pts/6    Ss+  10:59   0:00 l3script
root      9863  0.0  0.2  18948  1264 pts/3    R+   14:00   0:00 ps uax
13:00:24
#ps uax | sort -k4
root        21  0.0  0.0      0     0 ?        SN   Ноя24   0:00 [ksmd]
root       116  0.0  0.0      0     0 ?        S<   Ноя24   0:00 [ata_sff]
root        15  0.0  0.0      0     0 ?        S    Ноя24   0:00 [bdi-default]
root         8  0.0  0.0      0     0 ?        S<   Ноя24   0:00 [cpuset]
root        23  0.0  0.0      0     0 ?        S<   Ноя24   0:00 [crypto]
root       142  0.0  0.0      0     0 ?        S<   Ноя24   0:00 [ext4-dio-unwrit]
root        22  0.0  0.0      0     0 ?        S    Ноя24   0:00 [fsnotify_mark]
root        17  0.0  0.0      0     0 ?        S<   Ноя24   0:00 [kblockd]
root        10  0.0  0.0      0     0 ?        S    Ноя24   0:00 [kdevtmpfs]
root         9  0.0  0.0      0     0 ?        S<   Ноя24   0:00 [khelper]
...
user      7425  0.0  0.5  22184  2880 pts/0    Ss   09:12   0:00 -bash
user      7544  0.0  0.5  22268  3044 pts/1    Ss+  09:12   0:00 l3script
ivan      8651  0.0  0.6  22600  3200 pts/4    Ss+  10:19   0:00 -bash
root      8648  0.0  0.7  71288  3612 ?        Ss   10:19   0:00 sshd: ivan [priv]
root      7422  0.0  0.7  71288  3616 ?        Ss   09:12   0:00 sshd: user [priv]
root      8434  0.0  0.7  71288  3680 ?        Ss   10:11   0:01 sshd: root@pts/2
root      8881  0.0  0.7  71288  3684 ?        Ss   10:59   0:00 sshd: root@pts/5
user      4159  0.1  2.1  48272 11016 ?        Ss   Ноя27   2:27 l3-agent
root      3412  0.3  2.6  51044 13460 ?        Ss   Ноя27   6:18 l3-agent
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
13:00:39
#ps uax | sort -k4 -r
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      3412  0.3  2.6  51044 13460 ?        Ss   Ноя27   6:18 l3-agent
user      4159  0.1  2.1  48272 11016 ?        Ss   Ноя27   2:27 l3-agent
root      8881  0.0  0.7  71288  3684 ?        Ss   10:59   0:00 sshd: root@pts/5
root      8434  0.0  0.7  71288  3680 ?        Ss   10:11   0:01 sshd: root@pts/2
root      7422  0.0  0.7  71288  3616 ?        Ss   09:12   0:00 sshd: user [priv]
root      8648  0.0  0.7  71288  3612 ?        Ss   10:19   0:00 sshd: ivan [priv]
ivan      8651  0.0  0.6  22600  3200 pts/4    Ss+  10:19   0:00 -bash
user      7544  0.0  0.5  22268  3044 pts/1    Ss+  09:12   0:00 l3script
user      7425  0.0  0.5  22184  2880 pts/0    Ss   09:12   0:00 -bash
...
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        17  0.0  0.0      0     0 ?        S<   Ноя24   0:00 [kblockd]
root        22  0.0  0.0      0     0 ?        S    Ноя24   0:00 [fsnotify_mark]
root       142  0.0  0.0      0     0 ?        S<   Ноя24   0:00 [ext4-dio-unwrit]
root        23  0.0  0.0      0     0 ?        S<   Ноя24   0:00 [crypto]
root         8  0.0  0.0      0     0 ?        S<   Ноя24   0:00 [cpuset]
root        15  0.0  0.0      0     0 ?        S    Ноя24   0:00 [bdi-default]
root       116  0.0  0.0      0     0 ?        S<   Ноя24   0:00 [ata_sff]
root        21  0.0  0.0      0     0 ?        SN   Ноя24   0:00 [ksmd]
13:00:44
#ps uax | sort -k4 -r | head -11
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      3412  0.3  2.6  51044 13460 ?        Ss   Ноя27   6:19 l3-agent
user      4159  0.1  2.1  48272 11016 ?        Ss   Ноя27   2:27 l3-agent
root      8881  0.0  0.7  71288  3684 ?        Ss   10:59   0:00 sshd: root@pts/5
root      8434  0.0  0.7  71288  3680 ?        Ss   10:11   0:01 sshd: root@pts/2
root      7422  0.0  0.7  71288  3616 ?        Ss   09:12   0:00 sshd: user [priv]
root      8648  0.0  0.7  71288  3612 ?        Ss   10:19   0:00 sshd: ivan [priv]
ivan      8651  0.0  0.6  22600  3200 pts/4    Ss+  10:19   0:00 -bash
user      7544  0.0  0.5  22268  3044 pts/1    Ss+  09:12   0:00 l3script
user      7425  0.0  0.5  22184  2880 pts/0    Ss   09:12   0:00 -bash
root      8883  0.0  0.5  22168  2856 pts/5    Ss   10:59   0:00 -bash
13:02:01
#ls [0-9]
ls: невозможно получить доступ к [0-9]: Нет такого файла или каталога
13:02:17
#ls [0-9]*
213414134543  213414135  2134141354112  213414shtt  21343553ffr
13:02:26
#ls [0-9]* | xargs rm

13:03:30
#ls
f1  f2  f3  f4  f5  files.txt  install
13:03:33
#ps uax | sort -k4 -r | tee proc.txt | head -11
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      3412  0.3  2.6  51044 13460 ?        Ss   Ноя27   6:21 l3-agent
user      4159  0.1  2.1  48272 11016 ?        Ss   Ноя27   2:27 l3-agent
root      8881  0.0  0.7  71288  3684 ?        Ss   10:59   0:00 sshd: root@pts/5
root      8434  0.0  0.7  71288  3680 ?        Ss   10:11   0:01 sshd: root@pts/2
root      7422  0.0  0.7  71288  3616 ?        Ss   09:12   0:00 sshd: user [priv]
root      8648  0.0  0.7  71288  3612 ?        Ss   10:19   0:00 sshd: ivan [priv]
ivan      8651  0.0  0.6  22600  3200 pts/4    Ss+  10:19   0:00 -bash
user      7544  0.0  0.5  22268  3044 pts/1    Ss+  09:12   0:00 l3script
user      7425  0.0  0.5  22184  2880 pts/0    Ss   09:12   0:00 -bash
root      8883  0.0  0.5  22168  2856 pts/5    Ss   10:59   0:00 -bash
13:06:09
#ls
f1  f2  f3  f4  f5  files.txt  install  proc.txt
прошло 98 минут
/dev/pts/5
14:44:36
#cat install | grep rm
perl_modules="Term-VT102 Text-Iconv"
normC='\033[0;39m'
    printf "${whiteC}""$msg""...${normC}\n"
          printf "${greenC}""Ok\n""${normC}"
        printf "${redC}""Failed\n""${normC}"
For further information see http://xgu.ru/lilalo/ (in Russian).
rm -rf ${temp_dir}
14:44:58