/l3/users/2-11-2020/NT-Ladm/debian3.net.nt/root :1 :2 :3 :4 |
|
#~
![]() l3script: /root: Is a directory |
#Ñwhich find
![]() l3script: $'\321which': command not found |
#which find
/usr/bin/find |
#which xargs
/usr/bin/xargs |
#cp -v d2/f2 d4
`d2/f2' -> `d4/f2' |
#cp -rv d2 d1
`d2' -> `d1/d2' `d2/f2' -> `d1/d2/f2' `d2/d3' -> `d1/d2/d3' |
#find . -maxdepth 1 -type d -name "d*"
./d4 ./d2 ./d1 |
#find . maxdepth 1 -type d - name "d*" | xargs ls
find: paths must precede expression: - Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression] d1 d2 d4 f1 install who.txt whoH.txt |
#find . -maxdepth 1 -type d - name "d*" | xargs ls
find: paths must precede expression: - Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression] d1 d2 d4 f1 install who.txt whoH.txt |
#find . -maxdepth 1 -type d -name "d*" | xargs ls
./d1: d2 ./d2: d3 f2 ./d4: d5 f2 |
#rm d4
![]() rm: cannot remove `d4': Is a directory |
#rm -r d4
|
#find . -maxdepth 1 -type d -name "d*" | xargs ls
./d1: d2 ./d2: d3 f2 |
#echo d2/*
d2/d3 d2/f2 |
#cat who.txt
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) |
#shred who.txt
|
#cat who.txt
R²o®ÄUËèÞZôêëüY\bo¯EqTDL-W|OÔèϺû`yR Ë_½8±x'*)%ùªB& 'ä(HP¼¯ða²Ðÿ`Þ<Öpº!¬Î Úf¤»L 3Þ*N~MxÎGDﻪ[(^úM«ÍµÆÓýßV00¬\Ý[GLíU-ýJLAEÞ'pߢ!À%X|{Ëo[A(¿íñh3).Çòs0¸F!ßSù_.ÿ ¾ÅI ÐÒJnÏIûÒ9õÈ:$0×>%{Ë7§êCòka«¥@`µk`'íúÖáv´ìLÔ¹`E³cÆ9²{¨f¤Ü¹¨=£UÆýY¦ ÙMWSïj +Dt~\[8ÎIJjÕ:ºícg´åßê®LõMÖbÚf*Q~RC J Uç¹)k([v9W¬Z|ÔnzdµØd§1CÜæQÜ%'¢XBZ\ZüË{nÉ¥{Uûs]¥ dÛ¢{ó.D4´{¥ápÖàX"wÓê Ë>·*ú+ä£r9M0õýYPÿ¹WnÆèBçû5zØ%Dî<RË(ÖÝá" %¢ rCÜ:Ê øq @|¦àg@)í±¯Ä¨©@9Q%%¦ZÑu2Ñ>Çoô\ ù fAzaù%2ó¯~¸ò0{BCèÍÐøS#1ø»&ôê°µvÝAe%DïyÛj_ëQÉðîÈíÿO øTÅãGB´ÖÅ;ÏÓ+FuöæíÖ$AÏ'ÜÈÕJÜme}- ¦ðrk?Néû÷9I>RÜF6wÓÞÃ4Bt#¡XçCSkê·~:¶&£,ÕÂ,ÏÊÍchÿ½¦¥P½ÈÖÑ=Éée÷iÏùVµ»0¶î®SØ·¼õÕK$´yС ènûE¤jÒÈaò«¡¨´<ø§fæxè1Ì `nÙ0Ë®óHͤ§o÷Áÿ09-gr ¯xÒìº ¹ ... Ã{îAáÝAõ- ÂJ&MI?5cí¡C|tTÇAvUua®1çh í=r)õäP>Åó¥G÷øÃIKß½fc¿ª_ô xÜ4×ô=ü-ô_®#×Q»g>#fÿr¡xe¼·¸q®=pÔ¥¬«'Æ <'è°%e½.4z×#FÇÒë¢<7U~\Æ yefGs&FàK?éþõçjõû÷£¶éS½m<pMäKÎU»?<zá`>ùÌÚ/îËú7ü5Û/7«q±^Rµd]sÅli`©[¾SdUÛoa jÌÚö«<ļ£Û}ØmWò¶QÝÇè7FÂàó°°ù¦|I 4×ÖKíöliq Óÿ¨xXöînnsåæ4Þhð×iñ~DKhíZB"ß¶bX¸èÄg6$D£éÑ_ÉeFóGë} :.¯ LÌXAqÅYz Þ:s<G¹?ëº.YcFÐ ßÝ7Zé¹<Äì*ç¬åô8á·èýO÷bäíÿîÎ0y$® nÒP!ë6¨&.]÷kרïÉ1@Öô.X×÷x.Q vU´yH¥JÎ`8ûg´(d1' Þ¦Áe'j4ñkü%I2?°fáäÀF#5 ?î_Ü`ñ{üãBIè(´Ù¸MêK´Í@½Ñ 'rìÔ".ô#þ¬$>çå ¶¥ÿ%rôò^7µêÙÎmb÷Ó¿7ÊÙ÷Ó{Oâõ"o®OAã?7µ¿¬·:Z FMrëYy¶¬ø}ñm,diðÚEÇ}]3ÄiôÚlÑ~xCÖMSIbÝ.Ê·XÅdêd Âìõ¦Or-±ÌÁÛo0zvì |
#qvßê%"÷¦_
![]() l3script: PuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY: command not found |
#ls -l
total 24 drwxr-xr-x 3 root root 4096 Nov 2 13:16 d1 drwxr-xr-x 3 root root 4096 Nov 2 12:49 d2 -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 4096 Nov 2 13:22 who.txt -rw-r--r-- 2 root root 4096 Nov 2 13:22 whoH.txt |
#shred -u who.txt
|
#cat whoH.txt
|
#ls -l
total 16 drwxr-xr-x 3 root root 4096 Nov 2 13:16 d1 drwxr-xr-x 3 root root 4096 Nov 2 12:49 d2 -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-- 1 root root 0 Nov 2 13:24 whoH.txt |
#rm whoh.txt
![]() rm: cannot remove `whoh.txt': No such file or directory |
#rm whoH.txt
|
#find . -maxdepth 1 -type d -name "d*" | xargs ls
./d1: d2 ./d2: d3 f2 |
#which vi
/usr/bin/vi |
#which vim
/usr/bin/vim |
#ls -l `which vi`
lrwxrwxrwx 1 root root 20 Jun 27 2014 /usr/bin/vi -> /etc/alternatives/vi |
#ls -l $(which vi)
lrwxrwxrwx 1 root root 20 Jun 27 2014 /usr/bin/vi -> /etc/alternatives/vi |
#which vi | xargs ls -l
lrwxrwxrwx 1 root root 20 Jun 27 2014 /usr/bin/vi -> /etc/alternatives/vi |
#ls -l /etc/alternatives/vi
lrwxrwxrwx 1 root root 18 Jun 27 2014 /etc/alternatives/vi -> /usr/bin/vim.basic |
#ls -l $(which vim))
![]() l3script: syntax error near unexpected token `)' |
#ls -l $(which vim)
lrwxrwxrwx 1 root root 21 Jun 27 2014 /usr/bin/vim -> /etc/alternatives/vim |
#ls -l /etc/alternatives/vim
lrwxrwxrwx 1 root root 18 Jun 27 2014 /etc/alternatives/vim -> /usr/bin/vim.basic |
#ls -lh /usr/bin/vim.basic
-rwxr-xr-x 1 root root 1.8M Feb 10 2013 /usr/bin/vim.basic |
#ls
d1 d2 f1 install |
#vi install
|
# 31
![]() lilalo_rc=.l3rc 5268C 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' |
#vi .vimrc
|
#~
|
#cp .vimrc ~user
|
#cat /etc
![]() cat: /etc: Is a directory |
#cat /etc/sh
![]() cat: /etc/sh: No such file or directory |
#cat /etc/shells
# /etc/shells: valid login shells /bin/sh /bin/dash /bin/bash /bin/rbash /usr/bin/screen |
#ls -l /bin/*sh
-rwxr-xr-x 1 root root 975488 Sep 25 2014 /bin/bash -rwxr-xr-x 1 root root 106920 Mar 1 2012 /bin/dash lrwxrwxrwx 1 root root 4 Sep 25 2014 /bin/rbash -> bash lrwxrwxrwx 1 root root 4 Mar 1 2012 /bin/sh -> dash |
#pstree
init-+-acpid |-cron |-exim4 |-6*[getty] |-2*[l3-agent] |-rsyslogd---3*[{rsyslogd}] |-sshd-+-sshd---bash---script---script---l3script---pstree | |-2*[sshd---sshd---bash] | `-sshd---sshd---bash---script---script---l3script `-udevd |
#pstree -h
init-+-acpid |-cron |-exim4 |-6*[getty] |-2*[l3-agent] |-rsyslogd---3*[{rsyslogd}] |-sshd-+-sshd---bash---script---script---l3script---pstree | |-2*[sshd---sshd---bash] | `-sshd---sshd---bash---script---script---l3script `-udevd |
#echo $$
3510 |
#ps -l -p 3510
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 4 S 0 3510 3509 0 80 0 - 5432 - pts/1 00:00:00 l3script |
#ps -p 3510
PID TTY TIME CMD 3510 pts/1 00:00:00 l3script |
#ps -p $(echo $$)
PID TTY TIME CMD 3510 pts/1 00:00:00 l3script |
#head install
#!/bin/sh hostname=`hostname` uname -a | egrep -qi '(freebsd|darwin)' || hostname=`hostname -f` ############################################################################### # # Set this variables before installation: lilalo_user=13-10-2014 |
#head -3 install
#!/bin/sh hostname=`hostname` |
#tail -3 install
show_final_message |
#tail install
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 |
#dash
dash: 1: Syntax error: Bad fd number |
#ps -p $(echo $$)
PID TTY TIME CMD 3510 pts/1 00:00:00 l3script |
#echo $HISTSIZE
500 |
#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 ... 270 head install 271 head -3 install 272 tail -3 install 273 tail install 274 head -1 install 275 #^ Important path for current shell 276 dash 277 ps -p $(echo $$) 278 echo $HISTSIZE 279 history |
#echo $HISTSIZE
500 |
#echo $HISTFILESIZE
500 |
#vi /etc/profile
--- /tmp/l3-saved-3510.5880.5710 2020-11-03 09:13:45.631974881 +0200 +++ /etc/profile 2020-11-03 09:18:57.652037110 +0200 @@ -35,3 +35,7 @@ done unset i fi + +HISTSIZE=4000 +HISTFILESIZE=4000 +export HISTSIZE HISTFILESIZE |
#echo $HISTSIZE
4000 |
#ls
|
#ls -a
. .. .bash_logout .bashrc .profile |
#vi .bashrc
--- /tmp/l3-saved-6675.25775.8603 2020-11-03 09:35:15.352009474 +0200 +++ .bashrc 2020-11-03 09:36:45.104008333 +0200 @@ -16,8 +16,8 @@ shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -HISTSIZE=1000 -HISTFILESIZE=2000 +# HISTSIZE=4000 +# HISTFILESIZE=4000 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. |
#vi .bashrc
|
#cd /etc/s
![]() screenrc services shells staff-group-for-usr-local securetty sgml/ skel/ sysctl.conf security/ shadow ssh/ sysctl.d/ selinux/ shadow- ssl/ systemd/ |
#cd
|
#user
![]() useradd userdel usermod users |
#echo #HISTFILE
|
#cd ~ivan/.
![]() ./ ../ .bash_history .bash_logout .bashrc .profile .viminfo |
#cd
|
#cd /bin
|
#ls
bash date false ip loadkeys mountpoint open rmdir stty uncompress zforce busybox dd fgconsole kbd_mode login mt openvt rnano su unicode_start zgrep cat df fgrep kill ls mt-gnu pidof run-parts sync vdir zless chgrp dir findmnt kmod lsblk mv ping sed tailf which zmore chmod dmesg fuser less lsmod nano ping6 setfont tar ypdomainname znew chown dnsdomainname grep lessecho mkdir nc ps setupcon tempfile zcat chvt domainname gunzip lessfile mknod nc.traditional pwd sh touch zcmp cp dumpkeys gzexe lesskey mktemp netcat rbash sh.distrib true zdiff cpio echo gzip lesspipe more netstat readlink sleep umount zegrep dash egrep hostname ln mount nisdomainname rm ss uname zfgrep |
#ls --color
bash date false ip loadkeys mountpoint open rmdir stty uncompress zforce busybox dd fgconsole kbd_mode login mt openvt rnano su unicode_start zgrep cat df fgrep kill ls mt-gnu pidof run-parts sync vdir zless chgrp dir findmnt kmod lsblk mv ping sed tailf which zmore chmod dmesg fuser less lsmod nano ping6 setfont tar ypdomainname znew chown dnsdomainname grep lessecho mkdir nc ps setupcon tempfile zcat chvt domainname gunzip lessfile mknod nc.traditional pwd sh touch zcmp cp dumpkeys gzexe lesskey mktemp netcat rbash sh.distrib true zdiff cpio echo gzip lesspipe more netstat readlink sleep umount zegrep dash egrep hostname ln mount nisdomainname rm ss uname zfgrep |
#ls --color -F
bash* dd* fgrep* kmod* lsmod@ nc@ pwd* sh.distrib@ umount* zfgrep* busybox* df* findmnt* less* mkdir* nc.traditional* rbash@ sleep* uname* zforce* cat* dir* fuser* lessecho* mknod* netcat@ readlink* ss* uncompress* zgrep* chgrp* dmesg* grep* lessfile@ mktemp* netstat* rm* stty* unicode_start* zless* chmod* dnsdomainname* gunzip* lesskey* more* nisdomainname* rmdir* su* vdir* zmore* chown* domainname* gzexe* lesspipe* mount* open@ rnano@ sync* which* znew* chvt* dumpkeys* gzip* ln* mountpoint* openvt* run-parts* tailf* ypdomainname* cp* echo* hostname* loadkeys* mt@ pidof@ sed* tar* zcat* cpio* egrep* ip* login* mt-gnu* ping* setfont* tempfile* zcmp* dash* false* kbd_mode* ls* mv* ping6* setupcon* touch* zdiff* date* fgconsole* kill* lsblk* nano* ps* sh@ true* zegrep* |
#ls n*
nano nc nc.traditional netcat netstat nisdomainname |
#ls *sh
bash dash rbash sh |
#ls ??sh
bash dash |
#ls ??s*
bash busybox dash dnsdomainname fuser hostname less lessecho |