/l3/users/6-6-2017/NT-Ladm/debian2.net.nt/root :1 :2 :3 :4 :5 :6 |
|
#cat install | tr '-' ' '
#!/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 | tr '-' ' '
#!/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 | tr '-' ' '
#!/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 | tr '-' ' '
#!/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 | tr '-' ' '
#!/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 | tr '_' ' '
#!/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 | tr '_' ' '
#!/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 | tr '_' ' ' > install.new
|
#cat install.new | tr '-' ' ' > install.new
|
#cat install.new
#!/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.new | tr '"' ' ' > install.new
|
#cat install.new | tr '~' ' ' > install.new
|
#cat install.new | tr ' ' ' ' > install.new
|
#cat install.new | tr '/ ' ' ' > install.new
|
#cat install.new | tr '/' ' ' > install.new
|
#cat install.new
|
#cat install.new | tr ' ' ' ' >> install.new
|
#cat install.new
|
#cat install.new | tr ';' ' ' >> install.new
|
#cat install.new
|
#cat install.new | tr '"' ' ' >> install.new
|
#cat install.new
|
#cat install.new | tr '.' ' ' >> install.new
|
#cat install.new
|
#cat install.new
#!/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 | tr '_' ' ' | tr '=' ' '| tr '"' ' ' | tr '~' ' ' > install.new
|
#cat install | tr '_' ' ' | tr '=' ' ' > install.new
|
#cat install | tr '_' ' ' | tr [:digit:]
![]() tr: пропущен операнд после «[:digit:]» При преобразовании необходимо задать две строки. Попробуйте «tr --help» для получения более подробного описания. |
#cat install | tr '_' ' ' | tr -d [:digit:]
#!/bin/sh hostname=`hostname` uname -a | egrep -qi '(freebsd|darwin)' || hostname=`hostname -f` ############################################################################### # # Set this variables before installation: lilalo user=-- lab=NT-LNet install lbashrc for this users=${users:-"root user"} # users who will use lagent and lscript lilalo context="/users/${lilalo user}/${lab}/${hostname}" ... step "Downloading lprompt" ${wget} ${url lprompt} step "Downloading l-agent" '${wget} ${url lagent}; ${wget} ${url lconfig pm}; ${wget} ${url lconfig}' step "Downloading perl modules for l-agent" '{ for i in ${perl modules}; do ${wget} ${url perl modules}/$i.tar.gz; done; }' step "Installing perl modules for l-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 lbashrc to users home directories" install to users homes $install lbashrc for this users step "Adding lbashrc invocation to ~/.bashrc " install to users bashrc $install lbashrc for this users step "Adding l-agent invocation to ~/.bash profile " install to users bash profile $install lbashrc for this users cd / rm -rf ${temp dir} show final message |
#cat install | tr '_' ' ' | tr -d [:digit:] | tr -d [:punct:]
binsh hostnamehostname uname a egrep qi freebsddarwin hostnamehostname f Set this variables before installation lilalo user labNTLNet install lbashrc for this usersusersroot user users who will use lagent and lscript lilalo contextuserslilalo userlabhostname lilalo rclrc lilalo homelilalo ... step Downloading lprompt wget url lprompt step Downloading lagent wget url lagent wget url lconfig pm wget url lconfig step Downloading perl modules for lagent for i in perl modules do wget url perl modulesitargz done step Installing perl modules for lagent for i in perl modules do tar xvfz itargz cd iz perl MakefilePL make make install cd done step Installing lbashrc to users home directories install to users homes install lbashrc for this users step Adding lbashrc invocation to bashrc install to users bashrc install lbashrc for this users step Adding lagent invocation to bash profile install to users bash profile install lbashrc for this users cd rm rf temp dir show final message |
#cat install | tr '_' ' ' | tr -d [:digit:] | tr -d [:punct:] | sort | unig
![]() l3script: unig: команда не найдена |
#cat install | tr '_' ' ' | tr -d [:digit:] | tr -d [:punct:] | sort | uniq
apt get install deps apt get install thisperl make libmodulebuildperl libcdev gcc aptget install y apt get install this binsh cat FINAL MESSAGE cat log sed s cat log sed s cat USAGE cd cd temp dir ... url lprompturl lilalolprompt url perl modulesurl lilalo Usage USAGE Use commands user homeget user home user users wgetwget whiteCm Your current lilalo context is lilalo contextUSER |
#cat install | tr '_' ' ' | tr -d [:digit:] | tr -d [:punct:] | sort | uniq
apt get install deps apt get install thisperl make libmodulebuildperl libcdev gcc aptget install y apt get install this binsh cat FINAL MESSAGE cat log sed s cat log sed s cat USAGE cd cd temp dir ... url lprompturl lilalolprompt url perl modulesurl lilalo Usage USAGE Use commands user homeget user home user users wgetwget whiteCm Your current lilalo context is lilalo contextUSER |
#cat install | tr '_' ' ' | tr -d [:digit:] | tr -d [:punct:] | sort
apt get install deps apt get install thisperl make libmodulebuildperl libcdev gcc aptget install y apt get install this binsh cat FINAL MESSAGE cat log sed s cat log sed s cat USAGE cd cd temp dir ... Use commands user homeget user home user user homeget user home user user homeget user home user users users users wgetwget whiteCm Your current lilalo context is lilalo contextUSER |
#cat install | tr '_' ' ' | tr -d [:digit:] | tr -d [:punct:] | sort | uniq
apt get install deps apt get install thisperl make libmodulebuildperl libcdev gcc aptget install y apt get install this binsh cat FINAL MESSAGE cat log sed s cat log sed s cat USAGE cd cd temp dir ... url lprompturl lilalolprompt url perl modulesurl lilalo Usage USAGE Use commands user homeget user home user users wgetwget whiteCm Your current lilalo context is lilalo contextUSER |
#cat install | tr '_' ' ' | tr -d [:digit:] | tr -d [:punct:] | uniq | sort
apt get install deps apt get install thisperl make libmodulebuildperl libcdev gcc aptget install y apt get install this binsh cat FINAL MESSAGE cat log sed s cat log sed s cat USAGE cd cd temp dir ... Use commands user homeget user home user user homeget user home user user homeget user home user users users users wgetwget whiteCm Your current lilalo context is lilalo contextUSER |
#sed 's/[^a]//g' /etc/passwd |wc -c
71 |
#for i in *\ *
![]() > do > mv "$i" "'echo $i | sed 's/ /_/g' '" > done mv: не удалось выполнить stat для «* *»: Нет такого файла или каталога |
#ls
install install.new ip.txt passwd |
#iconv -f CP1251 -t KOI8-R
![]() áÃîëÃÿ çiconv: недопÑÑÑÐ¸Ð¼Ð°Ñ Ð²Ñ Ð¾Ð´Ð½Ð°Ñ Ð¿Ð¾ÑледоваÑелÑноÑÑÑ Ð² позиÑии 1 |
#iconv -f CP1251 -t KOI8-R
![]() Ãîïðîñ çiconv: недопÑÑÑÐ¸Ð¼Ð°Ñ Ð²Ñ Ð¾Ð´Ð½Ð°Ñ Ð¿Ð¾ÑледоваÑелÑноÑÑÑ Ð² позиÑии 1 |
#iconv -f CP1251 -t KOI8-R
vopros vopros |
#ls
install install.new ip.txt passwd |
#>fdgh dfgh
![]() l3script: dfgh: команда не найдена |
#vi fdgh dfgh
--- /tmp/l3-saved-6537.10967.17672 2017-06-07 16:43:37.310159811 +0300 +++ fdgh 2017-06-07 16:43:51.870204431 +0300 @@ -0,0 +1,2 @@ +sge:wq + |
#ls
fdgh install install.new ip.txt passwd |
#ls
fdgh install install.new ip.txt passwd |
#rm /tmp/*
![]() rm: невозможно удалить «/tmp/etccopy»: Это каталог |
#cd /tmp
|
#ls -l
итого 4 drwxr-xr-x 2 user user 4096 Июн 7 13:38 etccopy |
#ls
etccopy |
#cd etccopy
|
#ls
adduser.conf email-addresses kernel-img.conf motd rpc adjtime environment ld.so.cache mtab rsyslog.conf aliases fstab ld.so.conf nail.rc screenrc bash.bashrc gai.conf locale.alias nanorc securetty bash_completion group locale.gen networks services bindresvport.blacklist host.conf localtime nsswitch.conf shells blkid.tab hostname login.defs os-release staff-group-for-usr-local blkid.tab.old hosts logrotate.conf pam.conf sysctl.conf ca-certificates.conf hosts.allow mailcap passwd timezone console-cyrillic hosts.deny mailcap.order profile trafshow crontab inittab mailname protocols ucf.conf debconf.conf inputrc manpath.config rc.local wgetrc debian_version insserv.conf mime.types reportbug.conf deluser.conf issue mke2fs.conf resolv.conf discover-modprobe.conf issue.net modules rmt |
#cd
|
#find /home -empty -type f -user ivan -exec mv -v {} /tmp \;
«/home/ivan/test1245532» -> «/tmp/test1245532» «/home/ivan/test12» -> «/tmp/test12» «/home/ivan/test1245» -> «/tmp/test1245» «/home/ivan/test1» -> «/tmp/test1» «/home/ivan/test124» -> «/tmp/test124» «/home/ivan/test124553» -> «/tmp/test124553» «/home/ivan/test12455» -> «/tmp/test12455» «/home/ivan/test» -> «/tmp/test» «/home/ivan/test12455321» -> «/tmp/test12455321» |
#ls /tmp
etccopy test test1 test12 test124 test1245 test12455 test124553 test1245532 test12455321 |
#tree `ivan/
![]() > done > ^C |
#tree `ivan/
~ivan/ /home/ivan/ ├── d1 ├── d2 │ └── d3 ├── error.txt ├── files.txt └── passwd 3 directories, 3 files |
#find / -regex ".*\.jpe?g"
|
#find / -regex ".*\.jpe?g"
/home/petr/2fse3456.jpeg /home/petr/23456.jpeg /home/petr/234sg56.jpg /home/petr/23456.jpg |
#find ~ -mmin -5
/root/.lilalo /root/.lilalo/.report.dat /root/.lilalo/98425613843813393-1496902267.script /root/.lilalo/98425613843813393-1496902267.info |
#find ~ -mmin -5
/root/.lilalo /root/.lilalo/.report.dat /root/.lilalo/98425613843813393-1496902267.script /root/.lilalo/98425613843813393-1496902267.info |
#find ~ -regex '.*(\.tar\.gz|\.tgz|\.rpm)'
|
#find --help
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression] default path is the current directory; default expression is -print expression may consist of: operators, options, tests, and actions: operators (decreasing precedence; -and is implicit where no others are given): ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2 EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2 positional options (always true): -daystart -follow -regextype normal options (always true, specified before other expressions): -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev -ignore_readdir_race -noignore_readdir_race ... -readable -writable -executable -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N -used N -user NAME -xtype [bcdpfls] actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ; -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ; Report (and track progress on fixing) bugs via the findutils bug-reporting page at http://savannah.gnu.org/ or, if you have no web access, by sending email to <bug-findutils@gnu.org>. |
#help finde
![]() l3script: help: no help topics match `finde'. Try `help help' or `man -k finde' or `info finde'. |
#help find
![]() l3script: help: no help topics match `find'. Try `help help' or `man -k find' or `info find'. |
#find --?
![]() find: unknown predicate `--?' |
#find ?
![]() find: `?': Нет такого файла или каталога |
#find
. ./.aptitude ./.aptitude/config ./fdgh ./.bashrc ./.lilalo ./.lilalo/29881736138199336-1496759837_1496759887_etc_profile.diff ./.lilalo/302332565272128541-1496732906_1496752966_root_passwd.diff ./.lilalo/302332565272128541-1496732906.script ./.lilalo/29881736138199336-1496759837.info ... ./passwd ./.bash_history_old ./.profile ./ip.txt ./.l3rc ./.viminfo ./.vim ./.vim/.netrwhist ./.bash_profile ./install |
#help finde
![]() l3script: help: no help topics match `finde'. Try `help help' or `man -k finde' or `info finde'. |
#find ~ -regex '.*(\.tar\.gz|\.tgz|\.rpm)'
|
#find ~ -regex `.*(\.tar\.gz|\.tgz|\.rpm)`
![]() l3script: command substitution: line 1: syntax error near unexpected token `\.tar\.gz' l3script: command substitution: line 1: `.*(\.tar\.gz|\.tgz|\.rpm)' find: отсутствует аргумент у `-regex' |
#find ~ -regex ".*(\.tar\.gz|\.tgz|\.rpm)"
|
#find ~ -regex '.*(\.tar\.gz|\.tgz|\.rpm)'
|
#find --help
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression] default path is the current directory; default expression is -print expression may consist of: operators, options, tests, and actions: operators (decreasing precedence; -and is implicit where no others are given): ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2 EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2 positional options (always true): -daystart -follow -regextype normal options (always true, specified before other expressions): -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev -ignore_readdir_race -noignore_readdir_race ... -readable -writable -executable -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N -used N -user NAME -xtype [bcdpfls] actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ; -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ; Report (and track progress on fixing) bugs via the findutils bug-reporting page at http://savannah.gnu.org/ or, if you have no web access, by sending email to <bug-findutils@gnu.org>. |
#find -D opt
Predicate List: [-print] Eval Tree: pred=[-print] type=primary prec=no cost=Nothing rate=1,0 side effects no children. Normalized Eval Tree: pred=[-a] type=bi_op prec=and cost=Nothing rate=1,0 no side effects no left. right: pred=[-print] type=primary prec=no cost=Nothing rate=1,0 side effects ... ./passwd ./.bash_history_old ./.profile ./ip.txt ./.l3rc ./.viminfo ./.vim ./.vim/.netrwhist ./.bash_profile ./install |
#find -D ~ -regex '.*\.(\.tar\.gz|\.tgz|\.rpm)'
find: Ignoring unrecognised debug flag `/root' |
#ls /tmp
![]() |
#ls
![]() |
#'
![]() |
=$2<=>$3<=>$4>=0
local_session_id=98425613843813393-1496902267
nonce=151
pid=11399
prompt=#
pwd=/root
raw_end=29090
raw_file=/root/.lilalo/98425613843813393-1496902267.script
raw_output_start=29090
raw_start=27864
tab_seq=4
time=1496905082
uid=0' class='prompt'>#<>=$2<=>$3<=>$4>=0 && $1<256 && $2<256 && $3<256 && $4<256 && NF==4'
![]() |
#ls /tmp
![]() |
#ls
![]() |
#'
set +o noclobber |
#set -o noclobber
|
#ls /tmp
![]() |
#ls
![]() |
#'
stty -a speed 38400 baud; rows 45; columns 114; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke |
#ls /tmp
![]() |
#ls
![]() |
#'
man bash | wc -l 4228 |
#ls /tmp
![]() |
#ls
![]() |
#'
help shopt shopt: shopt [-pqsu] [-o] [optname ...] Set and unset shell options. Change the setting of each shell option OPTNAME. Without any option arguments, list all shell options with an indication of whether or not each is set. Options: -o restrict OPTNAMEs to those defined for use with `set -o' -p print each shell option with an indication of its status -q suppress output -s enable (set) each OPTNAME -u disable (unset) each OPTNAME Exit Status: Returns success if OPTNAME is enabled; fails if an invalid option is given or OPTNAME is disabled. |
#find ~ -regex '.*(\.tar\.gz|\.tgz|\.rpm)' -regextype posix-egrep
|
#find -regextype posix-egrep ~ -regex '.*(\.tar\.gz|\.tgz|\.rpm)'
find: paths must precede expression: /root Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression] |
#!/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 installed this already (y/n)?" echo y | read answer if echo $answer | grep -q ^[yY] then true else echo Please install the dependencies and rerun the script exit 1 fi fi } step() { msg="$1" shift printf "${whiteC}""$msg""...${normC}\n" # eval "$@" 2>&1 | sed 's/^/|\ \ \ /' && printf "Ok\n" || printf "Failed\n" eval "$@" 2>&1 > log 2>&1 && \ { cat log | sed 's/^/|\ \ \ /' printf "${greenC}""Ok\n""${normC}" } || \ { cat log | sed 's/^/|\ \ \ /' printf "${redC}""Failed\n""${normC}" } } get user home() { uname -a | egrep -qi '(freebsd|darwin)' && pw user show "$@"| awk -F: '{print $9}' || getent passwd "$@"| awk -F: '{print $6}' } install to users homes() { . l3bashrc users="$@" set -x for user in $users do user home=`get user home "$user"` mkdir -p ${user home}/${lilalo home} mkdir /etc/lilalo/ cp l3config.pm /etc/lilalo/ cp l3-agent /usr/local/bin cp l3-config /usr/local/bin ln -s `which bash` /usr/local/bin/l3script chmod 755 /usr/local/bin/l3-{agent,config} cp l3bashrc ${user home}/${lilalo home} cp l3prompt ${user home}/${lilalo home} chmod 755 ${user home}/${lilalo home}/l3prompt chown -R $user ${user home}/${lilalo home} echo l3cd=${lilalo context}/$user > ${user home}/${lilalo rc} chown -R $user ${user home}/${lilalo rc} done set +x } install to users bashrc() { users="$@" for user in $users do user home=`get user home "$user"` grep -q lilalo ${user home}/.bashrc 2> /dev/null\ || echo "[ \$0 == l3script ] && . ${user home}/.lilalo/l3bashrc && l3 start" >> ${user home}/.bashrc; chown -R ${user} ${user home}/.bashrc done } install to users bash profile() { users="$@" for user in $users do user home=`get user home "$user"` grep -q l3-agent ${user home}/.bash profile 2> /dev/null \ || { echo >> ${user home}/.bash profile ; cat ${user home}/.bash profile | sed '1s/^/l3-agentX/' | tr X '\n' > /tmp/$$$$l3 ; mv /tmp/$$$$l3 ${user home}/.bash profile; chown -R ${user} ${user home}/.bash profile; } done } show usage() { cat <<USAGE Usage: $0 USAGE } show final message() { cat <<FINAL MESSAGE Installation is successfully completed. Now restart your shell or relogin to start script writing. Your current lilalo context is ${lilalo context}/USER If you use xgu.ru backend, your labs will be available at http://xgu.ru/l3/${lilalo context} Use commands $ l3cd ${lilalo context%/*/*}/MY-NEW-CONTEXT/${hostname}/USER $ l3pwd to change and to know your current context. For further information see http://xgu.ru/lilalo/ (in Russian). Thank you gor using LiLaLo. Happy Labbing! (don't forget to restart bash or relogin) FINAL MESSAGE } temp dir=/tmp/lilalo-install-temp-$$ mkdir -p ${temp dir} cd ${temp dir} step "Installing dependencies" apt get install deps step "Downloading l3bashrc" ${wget} ${url l3bashrc} 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
Время первой команды журнала | 15:11:33 2017- 6- 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:16:03 2017- 6- 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 10.89 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.62 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.04 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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