/l3/users/2-11-2020/NT-Ladm/debian3.net.nt/root :1 :2 :3 :4 |
|
#date
Пнд Ноя 2 09:29:40 EET 2020 |
#useradd ivan
|
#echo $?
0 |
#useradd ivan
![]() useradd: пользователь «ivan» уже существует |
#echo $?
9 |
#$?
![]() l3script: 0: команда не найдена |
#passwd ivan
Введите новый пароль UNIX: Повторите ввод нового пароля UNIX: passwd: пароль успешно обновлён |
#userdel ivan
|
#useradd --help
ÐÑполÑзование: useradd [паÑамеÑÑÑ] ÐÐÐ seradd -D useradd -D [паÑамеÑÑÑ] ÐаÑамеÑÑÑ: -b, --base-dir ÐÐÐ_ÐÐТ базовÑй каÑалог Ð´Ð»Ñ Ð´Ð¾Ð¼Ð°Ñнего каÑалога новой ÑÑÑÑной запиÑи -c, --comment ÐÐÐÐÐÐТÐÐ ÐРполе GECOS новой ÑÑÑÑной запиÑи -d, --home-dir ÐÐÐ_ÐÐТ домаÑний каÑалог новой ÑÑÑÑной запиÑи -D, --defaults показаÑÑ Ð¸Ð»Ð¸ измениÑÑ Ð½Ð°ÑÑÑойки по ÑмолÑÐ°Ð½Ð¸Ñ Ð´Ð»Ñ useradd ... -p, --password ÐÐÐ ÐÐÑÑной запиÑи -r, --system ÑоздаÑÑ ÑиÑÑемнÑÑ ÑÑÑÑнÑÑ Ð·Ð°Ð¿Ð¸ÑÑ -R, --root ÐÐТ_CHROOT каÑалог, в коÑоÑÑй вÑполнÑеÑÑÑ chroot -s, --shell ÐÐÐРновой ÑÑÑÑной запиÑи -u, --uid UID полÑзоваÑелÑÑкий ID новой ÑÑÑÑной запиÑи -U, --user-group ÑоздаÑÑ Ð³ÑÑÐ¿Ð¿Ñ Ñ Ñем же именем ÑÑо и Ñ Ð¿Ð¾Ð»ÑзоваÑÐµÐ»Ñ -Z, --selinux-user SEUSER иÑполÑзоваÑÑ Ñказанного SEUSER Ð´Ð»Ñ Ð¿Ð¾Ð»ÑзоваÑелÑÑкого ÑопоÑÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ SELinux |
#useradd -m -s /bin/bash ivan
|
#passwd ivan
Введите новый пароль UNIX: Повторите ввод нового пароля UNIX: passwd: пароль успешно обновлён |
#useradd -m -s /bin/bash petr
|
#passwd petr
Введите новый пароль UNIX: Повторите ввод нового пароля UNIX: passwd: пароль успешно обновлён |
#passwd petr
Введите новый пароль UNIX: Повторите ввод нового пароля UNIX: passwd: пароль успешно обновлён |
#passwd petr
Введите новый пароль UNIX: Повторите ввод нового пароля UNIX: passwd: пароль успешно обновлён |
#who
root pts/0 2020-11-02 09:12 (192.168.15.129) ivan pts/2 2020-11-02 09:51 (192.168.15.129) petr pts/3 2020-11-02 09:53 (192.168.15.129) |
#whoami
root |
#hostname
debian3 |
#pwd
/root |
#echo ~
/root |
#echo '~'
~ |
#echo "'~'"
'~' |
#echo \~
~ |
#echo \\\\
\\ |
#echo \\ \\
\ \ |
#pwd
/root |
#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 |
#ch home
![]() l3script: ch: команда не найдена |
#cd home
|
#ls
ivan petr user |
#cd
|
#cd -
/home |
#cd -
/root |
#cd \
> |
#cd /
|
#cd ~
|
#echo $PWD
/root |
#echo $OLDPWD
/ |
#cd
|
#ls l
![]() ls: невозможно получить доступ к l: Нет такого файла или каталога |
#ls -l
итого 8 -rw-r--r-- 1 root root 5268 Окт 13 2014 install |
#ls -la
итого 56 drwx------ 5 root root 4096 Окт 15 2014 . drwxr-xr-x 24 root root 4096 Окт 15 2014 .. drwx------ 2 root root 4096 Июн 27 2014 .aptitude -rw------- 1 root root 1896 Окт 15 2014 .bash_history -rw-r--r-- 1 root root 10 Июн 27 2014 .bash_profile -rw-r--r-- 1 root root 630 Июн 27 2014 .bashrc -rw-r--r-- 1 root root 5268 Окт 13 2014 install -rw-r--r-- 1 root root 50 Окт 30 12:25 .l3rc drwxr-xr-x 2 root root 4096 Ноя 2 09:24 .lilalo -rw-r--r-- 1 root root 140 Ноя 19 2007 .profile drwxr-xr-x 2 root root 4096 Июн 27 2014 .vim -rw------- 1 root root 5189 Окт 15 2014 .viminfo |
#ls -l -a
итого 56 drwx------ 5 root root 4096 Окт 15 2014 . drwxr-xr-x 24 root root 4096 Окт 15 2014 .. drwx------ 2 root root 4096 Июн 27 2014 .aptitude -rw------- 1 root root 1896 Окт 15 2014 .bash_history -rw-r--r-- 1 root root 10 Июн 27 2014 .bash_profile -rw-r--r-- 1 root root 630 Июн 27 2014 .bashrc -rw-r--r-- 1 root root 5268 Окт 13 2014 install -rw-r--r-- 1 root root 50 Окт 30 12:25 .l3rc drwxr-xr-x 2 root root 4096 Ноя 2 09:24 .lilalo -rw-r--r-- 1 root root 140 Ноя 19 2007 .profile drwxr-xr-x 2 root root 4096 Июн 27 2014 .vim -rw------- 1 root root 5189 Окт 15 2014 .viminfo |
#ls -l -a --color
итого 56 drwx------ 5 root root 4096 Окт 15 2014 . drwxr-xr-x 24 root root 4096 Окт 15 2014 .. drwx------ 2 root root 4096 Июн 27 2014 .aptitude -rw------- 1 root root 1896 Окт 15 2014 .bash_history -rw-r--r-- 1 root root 10 Июн 27 2014 .bash_profile -rw-r--r-- 1 root root 630 Июн 27 2014 .bashrc -rw-r--r-- 1 root root 5268 Окт 13 2014 install -rw-r--r-- 1 root root 50 Окт 30 12:25 .l3rc drwxr-xr-x 2 root root 4096 Ноя 2 09:24 .lilalo -rw-r--r-- 1 root root 140 Ноя 19 2007 .profile drwxr-xr-x 2 root root 4096 Июн 27 2014 .vim -rw------- 1 root root 5189 Окт 15 2014 .viminfo |
#mailq
|
#which mailq
/usr/bin/mailq |
#ls -l /usr/bin/mailq
lrwxrwxrwx 1 root root 13 Янв 2 2013 /usr/bin/mailq -> ../sbin/exim4 |
#ls -l /usr/sbin/exim4
-rwsr-xr-x 1 root root 973824 Янв 2 2013 /usr/sbin/exim4 |
#ls -l /usr/bin/mailq --color
lrwxrwxrwx 1 root root 13 Янв 2 2013 /usr/bin/mailq -> ../sbin/exim4 |
#who
root pts/0 2020-11-02 09:12 (192.168.15.129) ivan pts/2 2020-11-02 09:51 (192.168.15.129) petr pts/3 2020-11-02 09:53 (192.168.15.129) |
#ls -l /dev/pts/1 --color
crw--w---- 1 root tty 136, 1 Ноя 2 11:11 /dev/pts/1 |
#ls -l /dev/pts/2 --color
crw--w---- 1 ivan tty 136, 2 Ноя 2 09:51 /dev/pts/2 |
#echo Hello
Hello |
#echo Hello > /dev/pts/2
|
#fdisk -l
Disk /dev/xvda: 17.2 GB, 17179869184 bytes 255 heads, 63 sectors/track, 2088 cylinders, total 33554432 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000e4875 Device Boot Start End Blocks Id System /dev/xvda1 2048 32088063 16043008 83 Linux Disk /dev/xvdb: 5368 MB, 5368709120 bytes 255 heads, 63 sectors/track, 652 cylinders, total 10485760 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/xvdb doesn't contain a valid partition table |
#mkfifo test
|
#mv test /tmp
|
#echo Hello > /tmp/test
|
#ls -l --color
итого 12 -rw-r--r-- 1 root root 5268 Окт 13 2014 install -rw-r--r-- 1 root root 168 Ноя 2 11:45 who.txt |
#ln who.txt whoH.txt
|
#ls -l --color
итого 16 -rw-r--r-- 1 root root 5268 Окт 13 2014 install -rw-r--r-- 2 root root 168 Ноя 2 11:45 whoH.txt -rw-r--r-- 2 root root 168 Ноя 2 11:45 who.txt |
#ls -li --color
итого 16 653043 -rw-r--r-- 1 root root 5268 Окт 13 2014 install 653092 -rw-r--r-- 2 root root 168 Ноя 2 11:45 whoH.txt 653092 -rw-r--r-- 2 root root 168 Ноя 2 11:45 who.txt |
#ln /root /rootH
![]() ln: «/root»: не допускается создавать жёсткие ссылки на каталоги |
#LANG=''
|
#ln /root /rootH
![]() ln: `/root': hard link not allowed for directory |
#mkdir d1
|
#mkdir d2
|
#mkdir d2/d3
|
#ls
d1 d2 install who.txt whoH.txt |
#mkdir d4/d5
![]() mkdir: cannot create directory `d4/d5': No such file or directory |
#mkdir -p d4/d5
|
#ls d2
d3 |
#ls d4
d5 |
#tree
![]() l3script: tree: command not found |
#apt-get install tree
![]() Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: tree 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 43.3 kB of archives. After this operation, 112 kB of additional disk space will be used. Err http://ftp.ua.debian.org/debian/ wheezy/main tree amd64 1.6.0-1 Could not resolve 'ftp.ua.debian.org' Failed to fetch http://ftp.ua.debian.org/debian/pool/main/t/tree/tree_1.6.0-1_amd64.deb Could not resolve 'ftp.ua.debian.org' E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? |
#apt-get update
Err http://ftp.ua.debian.org wheezy Release.gpg Could not resolve 'ftp.ua.debian.org' Err http://ftp.ua.debian.org wheezy-updates Release.gpg Could not resolve 'ftp.ua.debian.org' Err http://security.debian.org wheezy/updates Release.gpg Could not resolve 'security.debian.org' Reading package lists... Done W: Failed to fetch http://ftp.ua.debian.org/debian/dists/wheezy/Release.gpg Could not resolve 'ftp.ua.debian.org' W: Failed to fetch http://security.debian.org/dists/wheezy/updates/Release.gpg Could not resolve 'security.debian.org' W: Failed to fetch http://ftp.ua.debian.org/debian/dists/wheezy-updates/Release.gpg Could not resolve 'ftp.ua.debian.org' W: Some index files failed to download. They have been ignored, or old ones used instead. |
#cat /etc/resolv.conf
search net.nt nameserver 192.168.13.253 |
#vi /etc/resolv.conf
--- /tmp/l3-saved-3510.7984.13920 2020-11-02 12:00:05.987961188 +0200 +++ /etc/resolv.conf 2020-11-02 12:04:09.759986097 +0200 @@ -1,2 +1,3 @@ search net.nt -nameserver 192.168.13.253 +nameserver 192.168.10.240 +nameserver 8.8.8.8 |
#vi /etc/resolv.conf
|
#~
![]() Ign http://security.debian.org wheezy/updates Release.gpg Ign http://security.debian.org wheezy/updates Release Ign http://security.debian.org wheezy/updates/main Sources/DiffIndex Ign http://ftp.ua.debian.org wheezy Release.gpg Ign http://security.debian.org wheezy/updates/contrib Sources/DiffIndex Ign http://security.debian.org wheezy/updates/non-free Sources/DiffIndex Ign http://security.debian.org wheezy/updates/main amd64 Packages/DiffIndex Ign http://ftp.ua.debian.org wheezy-updates Release.gpg Ign http://security.debian.org wheezy/updates/contrib amd64 Packages/DiffIndex Ign http://security.debian.org wheezy/updates/non-free amd64 Packages/DiffIndex ... W: Failed to fetch http://ftp.ua.debian.org/debian/dists/wheezy/main/binary-amd64/Packages 404 Not Found [IP: 194.71.11.165 80] W: Failed to fetch http://ftp.ua.debian.org/debian/dists/wheezy/non-free/binary-amd64/Packages 404 Not Found [IP: 194.71.11.165 80] W: Failed to fetch http://ftp.ua.debian.org/debian/dists/wheezy/contrib/binary-amd64/Packages 404 Not Found [IP: 194.71.11.165 80] W: Failed to fetch http://ftp.ua.debian.org/debian/dists/wheezy-updates/main/source/Sources 404 Not Found [IP: 194.71.11.165 80] W: Failed to fetch http://ftp.ua.debian.org/debian/dists/wheezy-updates/contrib/source/Sources 404 Not Found [IP: 194.71.11.165 80] W: Failed to fetch http://ftp.ua.debian.org/debian/dists/wheezy-updates/non-free/source/Sources 404 Not Found [IP: 194.71.11.165 80] W: Failed to fetch http://ftp.ua.debian.org/debian/dists/wheezy-updates/main/binary-amd64/Packages 404 Not Found [IP: 194.71.11.165 80] W: Failed to fetch http://ftp.ua.debian.org/debian/dists/wheezy-updates/contrib/binary-amd64/Packages 404 Not Found [IP: 194.71.11.165 80] W: Failed to fetch http://ftp.ua.debian.org/debian/dists/wheezy-updates/non-free/binary-amd64/Packages 404 Not Found [IP: 194.71.11.165 80] E: Some index files failed to download. They have been ignored, or old ones used instead. |
#apt-get install tree
![]() Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: tree 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 43.3 kB of archives. After this operation, 112 kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! tree Install these packages without verification [y/N]? y Err http://ftp.ua.debian.org/debian/ wheezy/main tree amd64 1.6.0-1 404 Not Found [IP: 194.71.11.165 80] Failed to fetch http://ftp.ua.debian.org/debian/pool/main/t/tree/tree_1.6.0-1_amd64.deb 404 Not Found [IP: 194.71.11.165 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? |
#touch f1
|
#touch d2/f2
|
#ls
d1 d2 d4 f1 install who.txt whoH.txt |
#find . -type d -maxdepth 1
find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. . ./.aptitude ./.lilalo ./d4 ./d2 ./d1 ./.vim |
#find . -maxdepth 1 type d
![]() find: paths must precede expression: type Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression] |
#find . -maxdepth 1 -type d
. ./.aptitude ./.lilalo ./d4 ./d2 ./d1 ./.vim |
#find . -maxdepth 1 -type d | ls -l
total 28 drwxr-xr-x 2 root root 4096 Nov 2 11:53 d1 drwxr-xr-x 3 root root 4096 Nov 2 12:49 d2 drwxr-xr-x 3 root root 4096 Nov 2 11:56 d4 -rw-r--r-- 1 root root 0 Nov 2 12:48 f1 -rw-r--r-- 1 root root 5268 Oct 13 2014 install -rw-r--r-- 2 root root 168 Nov 2 11:45 who.txt -rw-r--r-- 2 root root 168 Nov 2 11:45 whoH.txt |
#find . -maxdepth 1 -type d | xargs ls -l
.: total 28 drwxr-xr-x 2 root root 4096 Nov 2 11:53 d1 drwxr-xr-x 3 root root 4096 Nov 2 12:49 d2 drwxr-xr-x 3 root root 4096 Nov 2 11:56 d4 -rw-r--r-- 1 root root 0 Nov 2 12:48 f1 -rw-r--r-- 1 root root 5268 Oct 13 2014 install -rw-r--r-- 2 root root 168 Nov 2 11:45 who.txt -rw-r--r-- 2 root root 168 Nov 2 11:45 whoH.txt ./.aptitude: ... total 0 ./d1: total 0 ./d2: total 4 drwxr-xr-x 2 root root 4096 Nov 2 11:53 d3 -rw-r--r-- 1 root root 0 Nov 2 12:49 f2 ./d4: total 4 drwxr-xr-x 2 root root 4096 Nov 2 11:56 d5 |
#find . -maxdepth 1 -type d | xargs ls
.: d1 d2 d4 f1 install who.txt whoH.txt ./.aptitude: config ./.lilalo: 133518653134476610-1413379473.info 2525264871024819419-1403867138.info 133518653134476610-1413379473.script 2525264871024819419-1403867138.script 143184190977814884-1413212456.info 26479210081176114181-1604301867.info 143184190977814884-1413212456.script 26479210081176114181-1604301867.script 1901738991017822016-1413212497.info 26479210081176114181-1604301867_1604311205_etc_resolv.conf.diff 1901738991017822016-1413212497.script 26479210081176114181-1604301867_1604311454_etc_resolv.conf.diff 23119324163069212524-1403867377.info l3-agent.pid 23119324163069212524-1403867377.script l3bashrc 23119324163069212524-1403867377_1403867394_root_.lilalo_l3bashrc.diff l3prompt 23119324163069212524-1403867377_1403867447_root_.l3rc.diff ./.vim: ./d1: ./d2: d3 f2 ./d4: d5 |
#find . -maxdepth 1 -type d -name "d*"
./d4 ./d2 ./d1 -a ÑвÑзка ÑÑand, по ÑмолÑÐ°Ð½Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñ ÑÑловиÑми |
#Ñ
![]() l3script: $'\321': command not found |
#ÑÑÑwhich find
![]() l3script: $'\321\206\321\321which': command not found |
search net.nt nameserver 192.168.13.253
Время первой команды журнала | 08:24:27 2020-11- 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:09:19 2020-11- 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 9.28 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 5.15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.40 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.67 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |