/l3/users/16-07-2018/NT-Ladm/debian2.net.nt/root :1 :2 :3 :4 :5 |
|
# 54
21 22 " If using a dark background within the editing area and syntax highlighting 23 " turn on this option as well 24 "set background=dark 25 26 " Uncomment the following to have Vim jump to the last position when 27 " reopening a file 28 "if has("autocmd") 29 " au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif 30 "endif ... 50 if filereadable("/etc/vim/vimrc.local") 51 source /etc/vim/vimrc.local 52 endif 53 54 set number 55 set mouse=a 56 colorscheme elflord 57 set nowrap 58 syntax on 58,10 Bot |
# 3 colorscheme elflord
30 "endif 31 32 " Uncomment the following to have Vim load indentation rules and plugins 33 " according to the detected filetype. 34 "if has("autocmd") 35 " filetype plugin indent on 36 "endif 37 38 " The following are commented out as they cause vim to behave a lot 39 " differently from regular Vi. They are highly recommended though. ... 53 54 set number 55 set mouse=a 56 colorscheme elflord desert 57 set nowrap 58 syntax on ~ ~ "/usr/share/vim/vimrc" 59L, 2267C written |
#vim /usr/share/vim/vimrc
--- /tmp/l3-saved-2410.23232.15231 2018-07-16 17:09:36.255903324 +0300 +++ /usr/share/vim/vimrc 2018-07-16 17:10:28.819917331 +0300 @@ -53,7 +53,7 @@ set number set mouse=a -colorscheme desert +colorscheme coehler set nowrap syntax on set hlsearch |
#vim /usr/share/vim/vimrc
--- /tmp/l3-saved-2410.18619.16777 2018-07-16 17:10:30.431903306 +0300 +++ /usr/share/vim/vimrc 2018-07-16 17:11:17.147925799 +0300 @@ -53,7 +53,7 @@ set number set mouse=a -colorscheme coehler +colorscheme koehler set nowrap syntax on set hlsearch |
#apt-get install zsh
Чтение списков пакетов… Готово Построение дерева зависимостей Чтение информации о состоянии… Готово Предлагаемые пакеты: zsh-doc НОВЫЕ пакеты, которые будут установлены: zsh обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. Необходимо скачать 4 916 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 11,7 MB. Получено:1 http://ftp.ua.debian.org/debian/ wheezy/main zsh amd64 4.3.17-1 [4 916 kB] Получено 4 916 kБ за 0с (5 079 kБ/c) Выбор ранее не выбранного пакета zsh. (Чтение базы данных … на данный момент установлено 28843 файла и каталога.) Распаковывается пакет zsh (из файла …/zsh_4.3.17-1_amd64.deb) … Обрабатываются триггеры для man-db … Настраивается пакет zsh (4.3.17-1) … update-alternatives: используется /bin/zsh4 для предоставления /bin/zsh (zsh) в автоматический режим update-alternatives: используется /bin/zsh4 для предоставления /bin/rzsh (rzsh) в автоматический режим update-alternatives: используется /bin/zsh4 для предоставления /bin/ksh (ksh) в автоматический режим |
#zsh
|
#cat /etc/shells
# /etc/shells: valid login shells /bin/sh /bin/dash /bin/bash /bin/rbash /usr/bin/screen /bin/zsh /usr/bin/zsh |
#who
root pts/0 2018-07-17 09:00 (192.168.15.128) user pts/2 2018-07-17 09:04 (192.168.15.128) |
#cat /etc/bash
![]() bash.bashrc bash_completion bash_completion.d/ |
#cat /etc/bash.bashrc
# System-wide .bashrc file for interactive bash(1) shells. # To enable the settings / commands in this file for login shells as well, # this file has to be sourced in /etc/profile. # If not running interactively, don't do anything [ -z "$PS1" ] && return # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # set variable identifying the chroot you work in (used in the prompt below) if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then ... return $? elif [ -x /usr/share/command-not-found/command-not-found ]; then /usr/bin/python /usr/share/command-not-found/command-not-found -- "$1" return $? else printf "%s: command not found\n" "$1" >&2 return 127 fi } fi |
#vim .bashrc
--- /tmp/l3-saved-5530.25170.6793 2018-07-17 09:28:07.503901197 +0300 +++ .bashrc 2018-07-17 09:29:13.011904510 +0300 @@ -17,3 +17,5 @@ # alias cp='cp -i' # alias mv='mv -i' [ $0 == l3script ] && . /root/.lilalo/l3bashrc && _l3_start + +alias ls = 'ls --color' |
# 21
|
#top
top - 09:31:22 up 1 day, 17 min, 2 users, load average: 0,00, 0,01, 0,05 Tasks: 59 total, 1 running, 58 sleeping, 0 stopped, 0 zombie %Cpu(s): 1,1 us, 0,0 sy, 0,0 ni, 98,3 id, 0,4 wa, 0,0 hi, 0,0 si, 0,1 st KiB Mem: 507368 total, 303392 used, 203976 free, 88036 buffers KiB Swap: 0 total, 0 used, 0 free, 114148 cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 20 0 10648 836 696 S 0,0 0,2 0:03.34 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.88 ksoftirqd/0 4 root 20 0 0 0 0 S 0,0 0,0 0:03.38 kworker/0:0 ... 2823 user 20 0 47752 10m 1696 S 0,0 2,1 7:55.02 l3-agent 5451 root 20 0 71380 3784 2888 S 0,0 0,7 0:00.08 sshd 5453 root 20 0 22180 2848 1696 S 0,0 0,6 0:00.04 bash 5498 root 20 0 18164 840 684 S 0,0 0,2 0:00.01 script 5529 root 20 0 18168 472 308 S 0,0 0,1 0:00.01 script 5530 root 20 0 21628 2280 1672 S 0,0 0,4 0:00.05 l3script 5553 root 20 0 71288 3608 2820 S 0,0 0,7 0:00.02 sshd 5555 user 20 0 71288 1748 964 S 0,0 0,3 0:00.03 sshd 5556 user 20 0 22176 2844 1700 S 0,0 0,6 0:00.04 bash 5601 user 20 0 18164 836 684 S 0,0 0,2 0:00.06 script |
#ls -la
итого 80 drwx------ 5 root root 4096 Июл 17 09:30 . drwxr-xr-x 24 root root 4096 Окт 15 2014 .. drwx------ 2 root root 4096 Июн 27 2014 .aptitude -rw------- 1 root root 3254 Июл 16 17:12 .bash_history -rw-r--r-- 1 root root 10 Июн 27 2014 .bash_profile -rw-r--r-- 1 root root 655 Июл 17 09:29 .bashrc -rw-r--r-- 2 root root 5268 Окт 13 2014 install -rw-r--r-- 2 root root 5268 Окт 13 2014 install2 -rw-r--r-- 1 root root 51 Июл 13 14:52 .l3rc -rw------- 1 root root 41 Июл 16 13:45 .lesshst drwxr-xr-x 2 root root 4096 Июл 17 09:30 .lilalo -rw-r--r-- 1 root root 140 Ноя 19 2007 .profile -rw-r--r-- 1 root root 5268 Июл 16 15:20 test drwxr-xr-x 2 root root 4096 Июн 27 2014 .vim -rw------- 1 root root 5699 Июл 17 09:30 .viminfo -rw-r--r-- 1 root root 64 Июл 16 16:18 .vimrc |
#bash
bash: alias: ls: не найден bash: alias: =: не найден bash: alias: ls --color: не найден root@debian2:~# ls -la итого 80 drwx------ 5 root root 4096 Июл 17 09:30 . drwxr-xr-x 24 root root 4096 Окт 15 2014 .. drwx------ 2 root root 4096 Июн 27 2014 .aptitude -rw------- 1 root root 3254 Июл 16 17:12 .bash_history -rw-r--r-- 1 root root 10 Июн 27 2014 .bash_profile ... -rw-r--r-- 1 root root 51 Июл 13 14:52 .l3rc -rw------- 1 root root 41 Июл 16 13:45 .lesshst drwxr-xr-x 2 root root 4096 Июл 17 09:30 .lilalo -rw-r--r-- 1 root root 140 Ноя 19 2007 .profile -rw-r--r-- 1 root root 5268 Июл 16 15:20 test drwxr-xr-x 2 root root 4096 Июн 27 2014 .vim -rw------- 1 root root 5699 Июл 17 09:30 .viminfo -rw-r--r-- 1 root root 64 Июл 16 16:18 .vimrc root@debian2:~# exit exit |
#vim .vimrc
|
# 6 syn number
2 3 # Note: PS1 and umask are already set in /etc/profile. You should not 4 # need this unless you want different defaults for root. 5 # PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ ' 6 # umask 022 7 8 # You may uncomment the following lines if you want `ls' to be colorized: 9 # export LS_OPTIONS='--color=auto' 10 [ eval "`dircolor] " 11 # aliass='ls --color' ... ~ ~ ~ ~ ~ ~ ~ ~ ~ ".bashrc" 21L, 653C записано |
#bash
root@debian2:~# ls -la итого 80 drwx------ 5 root root 4096 Июл 17 09:33 . drwxr-xr-x 24 root root 4096 Окт 15 2014 .. drwx------ 2 root root 4096 Июн 27 2014 .aptitude -rw------- 1 root root 3266 Июл 17 09:32 .bash_history -rw-r--r-- 1 root root 10 Июн 27 2014 .bash_profile -rw-r--r-- 1 root root 653 Июл 17 09:33 .bashrc -rw-r--r-- 2 root root 5268 Окт 13 2014 install -rw-r--r-- 2 root root 5268 Окт 13 2014 install2 -rw-r--r-- 1 root root 51 Июл 13 14:52 .l3rc -rw------- 1 root root 41 Июл 16 13:45 .lesshst drwxr-xr-x 2 root root 4096 Июл 17 09:33 .lilalo -rw-r--r-- 1 root root 140 Ноя 19 2007 .profile -rw-r--r-- 1 root root 5268 Июл 16 15:20 test drwxr-xr-x 2 root root 4096 Июн 27 2014 .vim -rw------- 1 root root 5653 Июл 17 09:33 .viminfo -rw-r--r-- 1 root root 64 Июл 16 16:18 .vimrc root@debian2:~# exit exit |
#source .bashrc
|
#ls -la
итого 80 drwx------ 5 root root 4096 Июл 17 09:33 . drwxr-xr-x 24 root root 4096 Окт 15 2014 .. drwx------ 2 root root 4096 Июн 27 2014 .aptitude -rw------- 1 root root 3278 Июл 17 09:35 .bash_history -rw-r--r-- 1 root root 10 Июн 27 2014 .bash_profile -rw-r--r-- 1 root root 653 Июл 17 09:33 .bashrc -rw-r--r-- 2 root root 5268 Окт 13 2014 install -rw-r--r-- 2 root root 5268 Окт 13 2014 install2 -rw-r--r-- 1 root root 51 Июл 13 14:52 .l3rc -rw------- 1 root root 41 Июл 16 13:45 .lesshst drwxr-xr-x 2 root root 4096 Июл 17 09:33 .lilalo -rw-r--r-- 1 root root 140 Ноя 19 2007 .profile -rw-r--r-- 1 root root 5268 Июл 16 15:20 test drwxr-xr-x 2 root root 4096 Июн 27 2014 .vim -rw------- 1 root root 5653 Июл 17 09:33 .viminfo -rw-r--r-- 1 root root 64 Июл 16 16:18 .vimrc |
#echo $HISTSIZE
500 |
#echo $HISTFILESIZE
500 |
#vim /etc/pro
![]() |
#vim /etc/profile
--- /tmp/l3-saved-5530.4021.17571 2018-07-17 09:41:40.399903801 +0300 +++ /etc/profile 2018-07-17 09:51:10.523862489 +0300 @@ -1,6 +1,4 @@ -# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) -# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). - +# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). if [ "`id -u`" -eq 0 ]; then PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" else @@ -35,3 +33,7 @@ done unset i fi + +HISTSIZE=2000 +HISTFILESIZE=2000 +export HISTFILESIZE HISTSIZE |
#cat /etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). if [ "`id -u`" -eq 0 ]; then PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" else PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" fi export PATH if [ "$PS1" ]; then if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then # The file bash.bashrc already sets the default PS1. ... for i in /etc/profile.d/*.sh; do if [ -r $i ]; then . $i fi done unset i fi HISTSIZE=2000 HISTFILESIZE=2000 export HISTFILESIZE HISTSIZE |
#echo $HISTSIZE
2000 |
#echo $HISTFILESIZE
2000 |
#cp ~/ivan/.bashrc ~/petr/
![]() cp: не удалось выполнить stat для «/root/ivan/.bashrc»: Нет такого файла или каталога |
#cp /home/ivan/.bashrc home/petr/
![]() cp: невозможно создать обычный файл «home/petr/»: Нет такого файла или каталога |
#cp /home/ivan/.bashrc /home/petr
|
#ls -ls /home/petr
итого 0 |
#ls -ls /home/petr/
итого 0 |
#ls -la /home/petr/
итого 28 drwxr-xr-x 2 petr petr 4096 Июл 16 17:12 . drwxr-xr-x 5 root root 4096 Июл 16 10:44 .. -rw------- 1 petr petr 17 Июл 16 17:12 .bash_history -rw-r--r-- 1 petr petr 220 Дек 30 2012 .bash_logout -rw-r--r-- 1 petr petr 3396 Июл 17 10:08 .bashrc -rw-r--r-- 1 petr petr 675 Дек 30 2012 .profile -rw------- 1 petr petr 1012 Июл 16 16:31 .viminfo |
#ls -la /etc/skel/
итого 20 drwxr-xr-x 2 root root 4096 Окт 13 2014 . drwxr-xr-x 69 root root 4096 Июл 17 09:51 .. -rw-r--r-- 1 root root 220 Дек 30 2012 .bash_logout -rw-r--r-- 1 root root 3392 Дек 30 2012 .bashrc -rw-r--r-- 1 root root 675 Дек 30 2012 .profile |
#vi /etc/skel/.bashrc
--- /tmp/l3-saved-6441.28716.27698 2018-07-17 10:10:40.635897230 +0300 +++ /etc/skel/.bashrc 2018-07-17 10:10:56.087930578 +0300 @@ -16,8 +16,8 @@ shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -HISTSIZE=1000 -HISTFILESIZE=2000 +# HISTSIZE=1000 +# HISTFILESIZE=2000 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. |
#history
1 ifconfig 2 vim /etc/network/interfaces 3 nano /etc/network/interfaces 4 /etc/init.d/networking restart 5 ifconfig 6 route 7 ping 192.168.13.253 8 shutdown -r now 9 exit 10 ping ya.ru ... 250 echo $HISTFILESIZE 251 cp ~/ivan/.bashrc ~/petr/ 252 cp /home/ivan/.bashrc home/petr/ 253 cp /home/ivan/.bashrc /home/petr 254 ls -ls /home/petr 255 ls -ls /home/petr/ 256 ls -la /home/petr/ 257 ls -la /etc/skel/ 258 vi /etc/skel/.bashrc 259 history |
#!233
top - 10:14:27 up 1 day, 1:00, 3 users, load average: 0,00, 0,01, 0,05 Tasks: 62 total, 1 running, 61 sleeping, 0 stopped, 0 zombie %Cpu(s): 0,3 us, 0,7 sy, 0,0 ni, 99,0 id, 0,0 wa, 0,0 hi, 0,0 si, 0,0 st KiB Mem: 507368 total, 307384 used, 199984 free, 88260 buffers KiB Swap: 0 total, 0 used, 0 free, 114740 cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4 root 20 0 0 0 0 S 0,3 0,0 0:03.59 kworker/0:0 2823 user 20 0 47752 10m 1696 S 0,3 2,1 7:55.77 l3-agent 1 root 20 0 10648 836 696 S 0,0 0,2 0:03.38 init 2 root 20 0 0 0 0 S 0,0 0,0 0:00.00 kthreadd ... 2191 root 20 0 49932 1248 640 S 0,0 0,2 0:00.00 sshd 2252 Debian-e 20 0 46804 1036 584 S 0,0 0,2 0:00.03 exim4 2279 root 20 0 18368 976 812 S 0,0 0,2 0:00.01 getty 2280 root 20 0 18368 972 812 S 0,0 0,2 0:00.00 getty 2281 root 20 0 18368 972 812 S 0,0 0,2 0:00.00 getty 2282 root 20 0 18368 972 812 S 0,0 0,2 0:00.00 getty 2283 root 20 0 18368 968 812 S 0,0 0,2 0:00.00 getty 2284 root 20 0 18368 972 812 S 0,0 0,2 0:00.00 getty 2295 root 20 0 0 0 0 S 0,0 0,0 0:00.74 flush-202:0 2338 root 20 0 47880 10m 1676 S 0,0 2,1 9:21.66 l3-agent |
#cd /usr/share/doc/
|
#ls
acpi diffutils gzip libattr1 libgcrypt11 libncurses5 libsub-exporter-perl locate os-prober sysv-rc acpid discover heirloom-mailx libbind9-80 libgdbm3 libncursesw5 libsub-install-perl lockfile-progs passwd tar acpi-support-base discover-data hostname libblkid1 libgeoip1 libnewt0.52 libswitch-perl login pciutils tasksel adduser dmidecode ifupdown libboost-iostreams1.49.0 libgmp10 libnfnetlink0 libtasn1-3 logrotate perl tasksel-data apt dmsetup info libbsd0 libgnutls26 libp11-kit0 libtext-charwidth-perl lsb-base perl-base tcpd aptitude dnsutils initramfs-tools libbz2-1.0 libgomp1 libpam0g libtext-iconv-perl lynx perl-modules tcpdump aptitude-common dpkg initscripts libc6 libgpg-error0 libpam-modules libtext-template-perl lynx-cur procps telnet apt-utils e2fslibs insserv libc6-dev libgpm2 libpam-modules-bin libtext-wrapi18n-perl make psmisc traceroute base-files e2fsprogs installation-report libc6-dev-i386 libgssapi-krb5-2 libpam-runtime libtinfo5 man-db python tree base-passwd eject install-info libc6-i386 libidn11 libparams-util-perl libudev0 manpages python2.7 tzdata ... coreutils gettext-base less libdevmapper1.02.1 liblockfile1 libsemanage1 libxdmcp6 netcat readline-common xauth cpio gnupg lib32gcc1 libdiscover2 liblockfile-bin libsemanage-common libxext6 netcat-traditional reportbug xkb-data cpp gpgv lib32gomp1 libdns88 liblwres80 libsepol1 libxml2 netdiag rsyslog xml-core cpp-4.7 grep lib32itm1 libedit2 liblzma5 libsigc++-2.0-0c2a libxmuu1 net-tools screen xz-utils cron groff-base lib32quadmath0 libept1.4.12 libmodule-build-perl libslang2 links ntpdate sed zlib1g dash grub2 libacl1 libexpat1 libmodule-signature-perl libsoftware-license-perl linux-base openssh-blacklist sensible-utils zsh debconf grub2-common libalgorithm-c3-perl libfreetype6 libmount1 libsqlite3-0 linux-image-3.2.0-4-amd64 openssh-blacklist-extra sgml-base debconf-i18n grub-common libapt-inst1.5 libfuse2 libmpc2 libss2 linux-image-amd64 openssh-client ssh debian-archive-keyring grub-pc libapt-pkg4.12 libgc1c2 libmpfr4 libssl1.0.0 linux-libc-dev openssh-server sysvinit debianutils grub-pc-bin libasprintf0c2 libgcc1 libmro-compat-perl libstdc++6 locales openssl sysvinit-utils |
#cd lib
![]() Display all 127 possibilities? (y or n) |
#cd lib
![]() Display all 127 possibilities? (y or n) lib32gcc1/ libc6/ libdevmapper1.02.1/ libgomp1/ liblocale-gettext-perl/ libp11-kit0/ libregexp-common-perl/ libtasn1-3/ libxapian22/ lib32gomp1/ libc6-dev/ libdiscover2/ libgpg-error0/ liblockfile1/ libpam0g/ libselinux1/ libtext-charwidth-perl/ libxau6/ lib32itm1/ libc6-dev-i386/ libdns88/ libgpm2/ liblockfile-bin/ libpam-modules/ libsemanage1/ libtext-iconv-perl/ libxcb1/ lib32quadmath0/ libc6-i386/ libedit2/ libgssapi-krb5-2/ liblwres80/ libpam-modules-bin/ libsemanage-common/ libtext-template-perl/ libxdmcp6/ libacl1/ libcap2/ libept1.4.12/ libidn11/ liblzma5/ libpam-runtime/ libsepol1/ libtext-wrapi18n-perl/ libxext6/ libalgorithm-c3-perl/ libc-bin/ libexpat1/ libisc84/ libmodule-build-perl/ libparams-util-perl/ libsigc++-2.0-0c2a/ libtinfo5/ libxml2/ libapt-inst1.5/ libc-dev-bin/ libfreetype6/ libisccc80/ libmodule-signature-perl/ libpcap0.8/ libslang2/ libudev0/ libxmuu1/ libapt-pkg4.12/ libclass-c3-perl/ libfuse2/ libisccfg82/ libmount1/ libpci3/ libsoftware-license-perl/ libusb-0.1-4/ libasprintf0c2/ libclass-c3-xs-perl/ libgc1c2/ libitm1/ libmpc2/ libpcre3/ libsqlite3-0/ libusb-1.0-0/ libattr1/ libclass-isa-perl/ libgcc1/ libk5crypto3/ libmpfr4/ libpipeline1/ libss2/ libustr-1.0-1/ libbind9-80/ libcomerr2/ libgcrypt11/ libkeyutils1/ libmro-compat-perl/ libpod-readme-perl/ libssl1.0.0/ libuuid1/ libblkid1/ libcwidget3/ libgdbm3/ libklibc/ libncurses5/ libpopt0/ libstdc++6/ libuuid-perl/ libboost-iostreams1.49.0/ libdata-optlist-perl/ libgeoip1/ libkmod2/ libncursesw5/ libprocps0/ libsub-exporter-perl/ libwrap0/ libbsd0/ libdata-section-perl/ libgmp10/ libkrb5-3/ libnewt0.52/ libquadmath0/ libsub-install-perl/ libx11-6/ libbz2-1.0/ libdb5.1/ libgnutls26/ libkrb5support0/ libnfnetlink0/ libreadline6/ libswitch-perl/ libx11-data/ |
#cd libcd
![]() l3script: cd: libcd: Нет такого файла или каталога |
#cd
|
#hist
![]() hist_append history |
#hist
![]() hist_append history |
#hist
![]() hist_append history |
#history
1 ifconfig 2 vim /etc/network/interfaces 3 nano /etc/network/interfaces 4 /etc/init.d/networking restart 5 ifconfig 6 route 7 ping 192.168.13.253 8 shutdown -r now 9 exit 10 ping ya.ru ... 256 ls -la /home/petr/ 257 ls -la /etc/skel/ 258 vi /etc/skel/.bashrc 259 history 260 top 261 cd /usr/share/doc/ 262 ls 263 cd libcd 264 cd 265 history |
#which history
![]() |
#echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
#which useradd
/usr/sbin/useradd |
#ls -la /usr/sbin/useradd
-rwxr-xr-x 1 root root 99864 Май 26 2012 /usr/sbin/useradd |
#echo $
![]() $_ $BASH_LINENO $COLUMNS $EUID $HOSTNAME $LANG $MAILCHECK $PIPESTATUS $SECONDS $TERM $BASH $BASHOPTS $COMP_WORDBREAKS $GROUPS $HOSTTYPE $LANGUAGE $old_file $PPID $SHELL $TIME $BASH_ALIASES $BASHPID $DIFFNAME $HISTCMD $IFS $LINENO $OLDPWD $PS1 $SHELLOPTS $UID $BASH_ARGC $BASH_SOURCE $DIR $HISTFILE $L3_HOME $LINES $OPTERR $PS2 $SHLVL $USER $BASH_ARGV $BASH_SUBSHELL $DIRSTACK $HISTFILESIZE $L3_PARENT_TTY $LOGNAME $OPTIND $PS4 $SSH_CLIENT $BASH_CMDS $BASH_VERSINFO $editor_file $HISTSIZE $L3_SESSION_ID $MACHTYPE $OSTYPE $PWD $SSH_CONNECTION $BASH_COMMAND $BASH_VERSION $editor_name $HOME $L3_TAMPERED_EDITORS $MAIL $PATH $RANDOM $SSH_TTY |
#echo $_
/usr/sbin/useradd |
#echo $_
/usr/sbin/useradd |
#echo $
![]() $_ $BASH_LINENO $COLUMNS $EUID $HOSTNAME $LANG $MAILCHECK $PIPESTATUS $SECONDS $TERM $BASH $BASHOPTS $COMP_WORDBREAKS $GROUPS $HOSTTYPE $LANGUAGE $old_file $PPID $SHELL $TIME $BASH_ALIASES $BASHPID $DIFFNAME $HISTCMD $IFS $LINENO $OLDPWD $PS1 $SHELLOPTS $UID $BASH_ARGC $BASH_SOURCE $DIR $HISTFILE $L3_HOME $LINES $OPTERR $PS2 $SHLVL $USER $BASH_ARGV $BASH_SUBSHELL $DIRSTACK $HISTFILESIZE $L3_PARENT_TTY $LOGNAME $OPTIND $PS4 $SSH_CLIENT $BASH_CMDS $BASH_VERSINFO $editor_file $HISTSIZE $L3_SESSION_ID $MACHTYPE $OSTYPE $PWD $SSH_CONNECTION $BASH_COMMAND $BASH_VERSION $editor_name $HOME $L3_TAMPERED_EDITORS $MAIL $PATH $RANDOM $SSH_TTY |
#echo $BASH_CMDS
|
#$
![]() $_ $BASH_LINENO $COLUMNS $EUID $HOSTNAME $LANG $MAILCHECK $PIPESTATUS $SECONDS $TERM $BASH $BASHOPTS $COMP_WORDBREAKS $GROUPS $HOSTTYPE $LANGUAGE $old_file $PPID $SHELL $TIME $BASH_ALIASES $BASHPID $DIFFNAME $HISTCMD $IFS $LINENO $OLDPWD $PS1 $SHELLOPTS $UID $BASH_ARGC $BASH_SOURCE $DIR $HISTFILE $L3_HOME $LINES $OPTERR $PS2 $SHLVL $USER $BASH_ARGV $BASH_SUBSHELL $DIRSTACK $HISTFILESIZE $L3_PARENT_TTY $LOGNAME $OPTIND $PS4 $SSH_CLIENT $BASH_CMDS $BASH_VERSINFO $editor_file $HISTSIZE $L3_SESSION_ID $MACHTYPE $OSTYPE $PWD $SSH_CONNECTION $BASH_COMMAND $BASH_VERSION $editor_name $HOME $L3_TAMPERED_EDITORS $MAIL $PATH $RANDOM $SSH_TTY |
#$
![]() $_ $BASH_LINENO $COLUMNS $EUID $HOSTNAME $LANG $MAILCHECK $PIPESTATUS $SECONDS $TERM $BASH $BASHOPTS $COMP_WORDBREAKS $GROUPS $HOSTTYPE $LANGUAGE $old_file $PPID $SHELL $TIME $BASH_ALIASES $BASHPID $DIFFNAME $HISTCMD $IFS $LINENO $OLDPWD $PS1 $SHELLOPTS $UID $BASH_ARGC $BASH_SOURCE $DIR $HISTFILE $L3_HOME $LINES $OPTERR $PS2 $SHLVL $USER $BASH_ARGV $BASH_SUBSHELL $DIRSTACK $HISTFILESIZE $L3_PARENT_TTY $LOGNAME $OPTIND $PS4 $SSH_CLIENT $BASH_CMDS $BASH_VERSINFO $editor_file $HISTSIZE $L3_SESSION_ID $MACHTYPE $OSTYPE $PWD $SSH_CONNECTION $BASH_COMMAND $BASH_VERSION $editor_name $HOME $L3_TAMPERED_EDITORS $MAIL $PATH $RANDOM $SSH_TTY |
#echo $SSH_TTY
/dev/pts/0 |
#echo "Hello $LOGNAME"
Hello root |
#echo 'Hello $LOGNAME'
Hello $LOGNAME |
#cd /bin/
|
#ls -la
итого 7420 drwxr-xr-x 2 root root 4096 Июл 17 09:17 . drwxr-xr-x 24 root root 4096 Окт 15 2014 .. -rwxr-xr-x 1 root root 975488 Сен 25 2014 bash -rwxr-xr-x 1 root root 697656 Сен 20 2012 busybox -rwxr-xr-x 1 root root 51856 Янв 26 2013 cat -rwxr-xr-x 1 root root 60000 Янв 26 2013 chgrp -rwxr-xr-x 1 root root 55872 Янв 26 2013 chmod -rwxr-xr-x 1 root root 64112 Янв 26 2013 chown -rwxr-xr-x 1 root root 10352 Апр 29 2012 chvt ... -rwxr-xr-x 1 root root 5766 Июн 20 2012 zdiff -rwxr-xr-x 1 root root 121 Июн 20 2012 zegrep -rwxr-xr-x 1 root root 121 Июн 20 2012 zfgrep -rwxr-xr-x 1 root root 2133 Июн 20 2012 zforce -rwxr-xr-x 1 root root 5914 Июн 20 2012 zgrep -rwxr-xr-x 1 root root 2039 Июн 20 2012 zless -rwxr-xr-x 1 root root 2802 Июн 20 2012 zmore -rwxr-xr-x 1 root root 5049 Июн 20 2012 znew lrwxrwxrwx 1 root root 21 Июл 17 09:17 zsh -> /etc/alternatives/zsh -rwxr-xr-x 1 root root 696880 Фев 29 2012 zsh4 |
#ls k*
kbd_mode kill kmod ksh |
#man rm
|
#ls g[uz]*
gunzip gzexe gzip |
#cd
|
#touch 32452345 2345 2345 2345 2345 234 54 5 4345 345 346345345 345bv45v34v v45 v534v 4
|
#ls
234 2345 32452345 345 345bv45v34v 346345345 4 4345 5 54 install install2 test v45 v534v |
#shopt
autocd off cdable_vars off cdspell off checkhash off checkjobs off checkwinsize on cmdhist on compat31 off compat32 off compat40 off ... no_empty_cmd_completion off nocaseglob off nocasematch off nullglob off progcomp on promptvars on restricted_shell off shift_verbose off sourcepath on xpg_echo off |
#ls +([[:digit:]])
![]() l3script: syntax error near unexpected token `(' |
#shop -s extglob
![]() l3script: shop: команда не найдена |
#shopt -s extglob
|
#ls +([[:digit:]])
234 2345 32452345 345 346345345 4 4345 5 54 |
#rm +([[:digit:]])
|
#ls
345bv45v34v install install2 test v45 v534v |
#find . -mmin -5
. ./.lilalo/.report.dat ./.lilalo/5695161453199013014-1531810334.script ./.lilalo/5695161453199013014-1531810334.info ./.lilalo/report.xml |
#find . -mmin -15
. ./345bv45v34v ./.lilalo/.report.dat ./.lilalo/5695161453199013014-1531810334.script ./.lilalo/5695161453199013014-1531810334.info ./.lilalo/report.xml ./v45 ./v534v |
#find . -maxdepth 1 -mmin -15
. ./345bv45v34v ./v45 ./v534v |
#find . -maxdepth 1 -mmin -15 -type f
./345bv45v34v ./v45 ./v534v |
#find . -maxdepth 1 -mmin -20 -type f
./345bv45v34v ./v45 ./v534v |
#find . -maxdepth 1 -mmin -20 -type f | xargs rm
|
#find . -maxdepth 1 -mmin -20 -type f
|
#ls
install install2 test |
#echo $[2+4]
6 |
#echo $[2+4*(3)]
14 |
#echo $[2+4*(3+2)]
22 |
#ps -ax | wc -l
warning: bad ps syntax, perhaps a bogus '-'? See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ 64 |
#ps ax | wc -l
64 |
#echo $[` ps ax | wc -l`-4]
61 |
#lsattr ~/ivan/files
![]() lsattr: Нет такого файла или каталога while trying to stat /root/ivan/files |
#lsattr /home/ivan/files
-------------e-- /home/ivan/files |
#chattr +a /home/ivan/files
|
#chattr +i /home/ivan/files
|
#history
1 ifconfig 2 vim /etc/network/interfaces 3 nano /etc/network/interfaces 4 /etc/init.d/networking restart 5 ifconfig 6 route 7 ping 192.168.13.253 8 shutdown -r now 9 exit 10 ping ya.ru ... 306 lsattr ~/ivan/files 307 lsattr /home/ivan/files 308 chattr +a /home/ivan/files 309 lsattr /home/ivan/files 310 chattr -a /home/ivan/files 311 chattr +i /home/ivan/files 312 lsattr /home/ivan/files 313 chattr -i /home/ivan/files 314 lsattr /home/ivan/files 315 history |
#ping i.ua
PING i.ua (91.198.36.14) 56(84) bytes of data. 64 bytes from www.i.ua (91.198.36.14): icmp_req=1 ttl=58 time=0.954 ms 64 bytes from www.i.ua (91.198.36.14): icmp_req=2 ttl=58 time=1.02 ms 64 bytes from www.i.ua (91.198.36.14): icmp_req=3 ttl=58 time=0.975 ms 64 bytes from www.i.ua (91.198.36.14): icmp_req=4 ttl=58 time=0.885 ms 64 bytes from www.i.ua (91.198.36.14): icmp_req=5 ttl=58 time=0.938 ms 64 bytes from www.i.ua (91.198.36.14): icmp_req=6 ttl=58 time=0.962 ms ^C --- i.ua ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 5008ms rtt min/avg/max/mdev = 0.885/0.956/1.025/0.052 ms |
#cat install
#!/bin/sh hostname=`hostname` uname -a | egrep -qi '(freebsd|darwin)' || hostname=`hostname -f` ############################################################################### # # Set this variables before installation: lilalo_user=13-10-2014 lab=NT-LNet install_l3bashrc_for_this_users=${users:-"root user"} # users who will use l3agent and l3script lilalo_context="/users/${lilalo_user}/${lab}/${hostname}" ... step "Downloading l3prompt" ${wget} ${url_l3prompt} step "Downloading l3-agent" '${wget} ${url_l3agent}; ${wget} ${url_l3config_pm}; ${wget} ${url_l3config}' step "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.tar.gz; done; }' step "Installing perl modules for l3-agent" '{ for i in ${perl_modules}; do tar xvfz $i.tar.gz; cd $i*[^z]; perl Makefile.PL; make; make install; cd ..; done; }' step "Installing l3bashrc to users home directories" install_to_users_homes $install_l3bashrc_for_this_users step "Adding l3bashrc invocation to ~/.bashrc " install_to_users_bashrc $install_l3bashrc_for_this_users step "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users cd / rm -rf ${temp_dir} show_final_message |
#cat install | grep '^rm'
rm -rf ${temp_dir} |
bash.bashrc bash_completion bash_completion.d/
# System-wide .bashrc file for interactive bash(1) shells. # To enable the settings / commands in this file for login shells as well, # this file has to be sourced in /etc/profile. # If not running interactively, don't do anything [ -z "$PS1" ] && return # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # set variable identifying the chroot you work in (used in the prompt below) if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi # set a fancy prompt (non-color, overwrite the one in /etc/profile) PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' # Commented out, don't overwrite xterm -T "title" -n "icontitle" by default. # If this is an xterm set the title to user@host:dir #case "$TERM" in #xterm*|rxvt*) # PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' # ;; #*) # ;; #esac # enable bash completion in interactive shells #if ! shopt -oq posix; then # if [ -f /usr/share/bash-completion/bash_completion ]; then # . /usr/share/bash-completion/bash_completion # elif [ -f /etc/bash_completion ]; then # . /etc/bash_completion # fi #fi # if the command-not-found package is installed, use it if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then function command_not_found_handle { # check because c-n-f could've been removed in the meantime if [ -x /usr/lib/command-not-found ]; then /usr/bin/python /usr/lib/command-not-found -- "$1" return $? elif [ -x /usr/share/command-not-found/command-not-found ]; then /usr/bin/python /usr/share/command-not-found/command-not-found -- "$1" return $? else printf "%s: command not found\n" "$1" >&2 return 127 fi } fi
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). if [ "`id -u`" -eq 0 ]; then PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" else PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" fi export PATH if [ "$PS1" ]; then if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then # The file bash.bashrc already sets the default PS1. # PS1='\h:\w\$ ' if [ -f /etc/bash.bashrc ]; then . /etc/bash.bashrc fi else if [ "`id -u`" -eq 0 ]; then PS1='# ' else PS1='$ ' fi fi fi # The default umask is now handled by pam_umask. # See pam_umask(8) and /etc/login.defs. if [ -d /etc/profile.d ]; then for i in /etc/profile.d/*.sh; do if [ -r $i ]; then . $i fi done unset i fi HISTSIZE=2000 HISTFILESIZE=2000 export HISTFILESIZE HISTSIZE
# /etc/shells: valid login shells /bin/sh /bin/dash /bin/bash /bin/rbash /usr/bin/screen /bin/zsh /usr/bin/zsh
#!/bin/sh hostname=`hostname` uname -a | egrep -qi '(freebsd|darwin)' || hostname=`hostname -f` ############################################################################### # # Set this variables before installation: lilalo_user=13-10-2014 lab=NT-LNet install_l3bashrc_for_this_users=${users:-"root user"} # users who will use l3agent and l3script lilalo_context="/users/${lilalo_user}/${lab}/${hostname}" # ############################################################################### lilalo_rc=.l3rc lilalo_home=.lilalo url_lilalo="http://xgu.ru/lilalo" url_l3bashrc="${url_lilalo}"/l3bashrc url_l3agent="${url_lilalo}"/l3-agent url_l3config_pm="${url_lilalo}"/l3config.pm url_l3config="${url_lilalo}"/l3-config url_l3prompt="${url_lilalo}"/l3prompt url_perl_modules=${url_lilalo}/ perl_modules="Term-VT102 Text-Iconv" apt_get_install_this="perl make libmodule-build-perl libc6-dev gcc" wget=wget uname -a | egrep -qi '(bsd|darwin)' && wget=fetch normC='\033[0;39m' whiteC='\033[1;37m' redC='\033[0;31m' greenC='\033[0;32m' apt_get_install_deps() { return 0 if which apt-get >& /dev/null then apt-get install -y $apt_get_install_this else echo "Please install this dependencies manually:" echo $apt_get_install_this echo "Have you inst