/l3/users/3-2-2020/NT-Ladm/debian1.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
#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 |
#cd bin
|
#ls
-qwwuiq cpio echo gzip lesspipe more netstat readlink sleep umount zegrep \qwwuiq dash egrep hostname ln mount nisdomainname rm ss uname zfgrep 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 |
#clear
|
#ls
-qwwuiq cpio echo gzip lesspipe more netstat readlink sleep umount zegrep \qwwuiq dash egrep hostname ln mount nisdomainname rm ss uname zfgrep 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 |
#ls /*
/initrd.img /vmlinuz /bin: -qwwuiq cpio echo gzip lesspipe more netstat readlink sleep umount zegrep \qwwuiq dash egrep hostname ln mount nisdomainname rm ss uname zfgrep 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 ... /selinux: /srv: /sys: block bus class dev devices firmware fs hypervisor kernel module power /tmp: My f1 f1h /usr: bin games include lib lib32 local sbin share src /var: backups cache lib local lock log mail opt run spool tmp |
#clear
|
#ls
-qwwuiq cpio echo gzip lesspipe more netstat readlink sleep umount zegrep \qwwuiq dash egrep hostname ln mount nisdomainname rm ss uname zfgrep 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 |
#ls '/*'
![]() ls: cannot access /*: No such file or directory |
#ls \*
![]() ls: cannot access *: No such file or directory |
#ls '\*'
![]() ls: cannot access \*: No such file or directory |
#ls [\]*
![]() ls: cannot access []*: No such file or directory |
#ls
-qwwuiq cpio echo gzip lesspipe more netstat readlink sleep umount zegrep \qwwuiq dash egrep hostname ln mount nisdomainname rm ss uname zfgrep 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 |
#ls .\\*
![]() ls: cannot access .\*: No such file or directory |
#ls ./\*
![]() ls: cannot access ./*: No such file or directory |
#ls '\qwwuiq'
\qwwuiq |
#ls '\'*
\qwwuiq |
#ls '-'*
![]() ls: invalid line width: wuiq |
#ls ./-*
./-qwwuiq |
#ls -a
-qwwuiq 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 ..qwwuiq cpio echo gzip lesspipe more netstat readlink sleep umount zegrep \qwwuiq dash egrep hostname ln mount nisdomainname rm ss uname zfgrep 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 |
#ls ..*
..qwwuiq ..: 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 |
#ls "..'*
![]() > ^C |
#ls '..'*
..qwwuiq ..: 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 |
#ls '..'q*
..qwwuiq |
#ls '..'q*
..qwwuiq |
#rm '..'q*
|
#ls '..'q*
![]() ls: cannot access ..q*: No such file or directory |
#ls -a
-qwwuiq 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 \qwwuiq dash egrep hostname ln mount nisdomainname rm ss uname zfgrep 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 |
#ls ./-*
./-qwwuiq |
#rm ./-*
|
#ls ./-*
![]() ls: cannot access ./-*: No such file or directory |
#ls -a
. chvt dnsdomainname fuser kmod ls mt open rm sleep true zcmp .. cp domainname grep less lsblk mt-gnu openvt rmdir ss umount zdiff \qwwuiq cpio dumpkeys gunzip lessecho lsmod mv pidof rnano stty uname zegrep bash dash echo gzexe lessfile mkdir nano ping run-parts su uncompress zfgrep busybox date egrep gzip lesskey mknod nc ping6 sed sync unicode_start zforce cat dd false hostname lesspipe mktemp nc.traditional ps setfont tailf vdir zgrep chgrp df fgconsole ip ln more netcat pwd setupcon tar which zless chmod dir fgrep kbd_mode loadkeys mount netstat rbash sh tempfile ypdomainname zmore chown dmesg findmnt kill login mountpoint nisdomainname readlink sh.distrib touch zcat znew |
#ls '\'*
\qwwuiq |
#rm '\'*
|
#ls -a
. cpio echo gzip lesspipe more netstat readlink sleep umount zegrep .. dash egrep hostname ln mount nisdomainname rm ss uname zfgrep 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 |
#cd
|
#clear
|
#clerar
![]() l3script: clerar: command not found |
#clear
|
#touch "Andrey Stah"
|
#ls
Andrey Stah d1 d2 install ~ivan ~petr ~user |
#ls -a
. .aptitude .bash_profile .l3rc .profile .viminfo Andrey Stah d2 ~ivan ~user .. .bash_history .bashrc .lilalo .vim .vimrc d1 install ~petr |
#ls -s
total 28 0 Andrey Stah 4 d1 4 d2 8 install 4 ~ivan 4 ~petr 4 ~user |
#ls -l
total 28 -rw-r--r-- 1 root root 0 Feb 4 11:34 Andrey Stah drwxr-xr-x 2 root root 4096 Feb 3 12:52 d1 drwxr-xr-x 3 root root 4096 Feb 3 15:17 d2 -rw-r--r-- 1 root root 5268 Oct 13 2014 install -rw-r--r-- 1 root root 96 Feb 4 10:05 ~ivan -rw-r--r-- 1 root root 96 Feb 4 10:05 ~petr -rw-r--r-- 1 root root 96 Feb 4 10:05 ~user |
#clear
|
#touch 'Andrey Stah2'
|
#ls -l
total 28 -rw-r--r-- 1 root root 0 Feb 4 11:34 Andrey Stah -rw-r--r-- 1 root root 0 Feb 4 11:35 Andrey Stah2 drwxr-xr-x 2 root root 4096 Feb 3 12:52 d1 drwxr-xr-x 3 root root 4096 Feb 3 15:17 d2 -rw-r--r-- 1 root root 5268 Oct 13 2014 install -rw-r--r-- 1 root root 96 Feb 4 10:05 ~ivan -rw-r--r-- 1 root root 96 Feb 4 10:05 ~petr -rw-r--r-- 1 root root 96 Feb 4 10:05 ~user |
#touch one\ space
|
#ls -l
total 28 -rw-r--r-- 1 root root 0 Feb 4 11:34 Andrey Stah -rw-r--r-- 1 root root 0 Feb 4 11:35 Andrey Stah2 drwxr-xr-x 2 root root 4096 Feb 3 12:52 d1 drwxr-xr-x 3 root root 4096 Feb 3 15:17 d2 -rw-r--r-- 1 root root 5268 Oct 13 2014 install -rw-r--r-- 1 root root 0 Feb 4 11:35 one space -rw-r--r-- 1 root root 96 Feb 4 10:05 ~ivan -rw-r--r-- 1 root root 96 Feb 4 10:05 ~petr -rw-r--r-- 1 root root 96 Feb 4 10:05 ~user |
#touch "A' Stah"
|
#ls -l
total 28 -rw-r--r-- 1 root root 0 Feb 4 11:37 A' Stah -rw-r--r-- 1 root root 0 Feb 4 11:34 Andrey Stah -rw-r--r-- 1 root root 0 Feb 4 11:35 Andrey Stah2 drwxr-xr-x 2 root root 4096 Feb 3 12:52 d1 drwxr-xr-x 3 root root 4096 Feb 3 15:17 d2 -rw-r--r-- 1 root root 5268 Oct 13 2014 install -rw-r--r-- 1 root root 0 Feb 4 11:35 one space -rw-r--r-- 1 root root 96 Feb 4 10:05 ~ivan -rw-r--r-- 1 root root 96 Feb 4 10:05 ~petr -rw-r--r-- 1 root root 96 Feb 4 10:05 ~user |
#touch "A:\Stah\11"
|
#ls -l
total 28 -rw-r--r-- 1 root root 0 Feb 4 11:37 A' Stah -rw-r--r-- 1 root root 0 Feb 4 11:38 A:\Stah\11 -rw-r--r-- 1 root root 0 Feb 4 11:34 Andrey Stah -rw-r--r-- 1 root root 0 Feb 4 11:35 Andrey Stah2 drwxr-xr-x 2 root root 4096 Feb 3 12:52 d1 drwxr-xr-x 3 root root 4096 Feb 3 15:17 d2 -rw-r--r-- 1 root root 5268 Oct 13 2014 install -rw-r--r-- 1 root root 0 Feb 4 11:35 one space -rw-r--r-- 1 root root 96 Feb 4 10:05 ~ivan -rw-r--r-- 1 root root 96 Feb 4 10:05 ~petr -rw-r--r-- 1 root root 96 Feb 4 10:05 ~user |
#touch A:\\Stah\\22
|
#ls -l
total 28 -rw-r--r-- 1 root root 0 Feb 4 11:37 A' Stah -rw-r--r-- 1 root root 0 Feb 4 11:38 A:\Stah\11 -rw-r--r-- 1 root root 0 Feb 4 11:38 A:\Stah\22 -rw-r--r-- 1 root root 0 Feb 4 11:34 Andrey Stah -rw-r--r-- 1 root root 0 Feb 4 11:35 Andrey Stah2 drwxr-xr-x 2 root root 4096 Feb 3 12:52 d1 drwxr-xr-x 3 root root 4096 Feb 3 15:17 d2 -rw-r--r-- 1 root root 5268 Oct 13 2014 install -rw-r--r-- 1 root root 0 Feb 4 11:35 one space -rw-r--r-- 1 root root 96 Feb 4 10:05 ~ivan -rw-r--r-- 1 root root 96 Feb 4 10:05 ~petr -rw-r--r-- 1 root root 96 Feb 4 10:05 ~user |
#echo *
A' Stah A:\Stah\11 A:\Stah\22 Andrey Stah Andrey Stah2 d1 d2 install one space ~ivan ~petr ~user |
#touch '-bad-name-'
![]() touch: invalid option -- 'b' Try `touch --help' for more information. |
#touch ./-bad-name-
|
#ls -l
total 28 -rw-r--r-- 1 root root 0 Feb 4 11:41 -bad-name- -rw-r--r-- 1 root root 0 Feb 4 11:37 A' Stah -rw-r--r-- 1 root root 0 Feb 4 11:38 A:\Stah\11 -rw-r--r-- 1 root root 0 Feb 4 11:38 A:\Stah\22 -rw-r--r-- 1 root root 0 Feb 4 11:34 Andrey Stah -rw-r--r-- 1 root root 0 Feb 4 11:35 Andrey Stah2 drwxr-xr-x 2 root root 4096 Feb 3 12:52 d1 drwxr-xr-x 3 root root 4096 Feb 3 15:17 d2 -rw-r--r-- 1 root root 5268 Oct 13 2014 install -rw-r--r-- 1 root root 0 Feb 4 11:35 one space -rw-r--r-- 1 root root 96 Feb 4 10:05 ~ivan -rw-r--r-- 1 root root 96 Feb 4 10:05 ~petr -rw-r--r-- 1 root root 96 Feb 4 10:05 ~user |
#ls
-bad-name- A' Stah A:\Stah\11 A:\Stah\22 Andrey Stah Andrey Stah2 d1 d2 install one space ~ivan ~petr ~user |
#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 agent
install_l3bashrc_for_this_users=${users:-"root user"} # users who will use l3agent and l3script url_l3agent="${url_lilalo}"/l3-agent cp l3-agent /usr/local/bin chmod 755 /usr/local/bin/l3-{agent,config} 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; } 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 "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users |
#cat install | grep agent
install_l3bashrc_for_this_users=${users:-"root user"} # users who will use l3agent and l3script url_l3agent="${url_lilalo}"/l3-agent cp l3-agent /usr/local/bin chmod 755 /usr/local/bin/l3-{agent,config} 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; } 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 "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users |
#cat install | grep agent | nl
1 install_l3bashrc_for_this_users=${users:-"root user"} # users who will use l3agent and l3script 2 url_l3agent="${url_lilalo}"/l3-agent 3 cp l3-agent /usr/local/bin 4 chmod 755 /usr/local/bin/l3-{agent,config} 5 grep -q l3-agent ${user_home}/.bash_profile 2> /dev/null \ 6 || { 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; } 7 step "Downloading l3-agent" '${wget} ${url_l3agent}; ${wget} ${url_l3config_pm}; ${wget} ${url_l3config}' 8 step "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.tar.gz; done; }' 9 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; }' 10 step "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users |
#cat install | grep agent | nl
1 install_l3bashrc_for_this_users=${users:-"root user"} # users who will use l3agent and l3script 2 url_l3agent="${url_lilalo}"/l3-agent 3 cp l3-agent /usr/local/bin 4 chmod 755 /usr/local/bin/l3-{agent,config} 5 grep -q l3-agent ${user_home}/.bash_profile 2> /dev/null \ 6 || { 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; } 7 step "Downloading l3-agent" '${wget} ${url_l3agent}; ${wget} ${url_l3config_pm}; ${wget} ${url_l3config}' 8 step "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.tar.gz; done; }' 9 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; }' 10 step "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users |
#cat install | grep ^step
step() 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 |
#cat install | grep ^step | nl
1 step() 2 step "Installing dependencies" apt_get_install_deps 3 step "Downloading l3bashrc" ${wget} ${url_l3bashrc} 4 step "Downloading l3prompt" ${wget} ${url_l3prompt} 5 step "Downloading l3-agent" '${wget} ${url_l3agent}; ${wget} ${url_l3config_pm}; ${wget} ${url_l3config}' 6 step "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.tar.gz; done; }' 7 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; }' 8 step "Installing l3bashrc to users home directories" install_to_users_homes $install_l3bashrc_for_this_users 9 step "Adding l3bashrc invocation to ~/.bashrc " install_to_users_bashrc $install_l3bashrc_for_this_users 10 step "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users |
#cat install | grep 'step$' | nl
|
#cat install | grep 'users$' | nl
1 for user in $users 2 for user in $users 3 for user in $users 4 step "Installing l3bashrc to users home directories" install_to_users_homes $install_l3bashrc_for_this_users 5 step "Adding l3bashrc invocation to ~/.bashrc " install_to_users_bashrc $install_l3bashrc_for_this_users 6 step "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users |
#cat install | grep 'users$' | nl
1 for user in $users 2 for user in $users 3 for user in $users 4 step "Installing l3bashrc to users home directories" install_to_users_homes $install_l3bashrc_for_this_users 5 step "Adding l3bashrc invocation to ~/.bashrc " install_to_users_bashrc $install_l3bashrc_for_this_users 6 step "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users |
#vi install
--- /tmp/l3-saved-7810.1846.27685 2020-02-04 12:53:07.016254647 +0200 +++ install 2020-02-04 12:54:08.020233745 +0200 @@ -87,7 +87,7 @@ . l3bashrc users="$@" set -x - for user in $users + for user in $user do user_home=`get_user_home "$user"` mkdir -p ${user_home}/${lilalo_home} |
#cat install | grep 'user$' | nl
1 for user in $user |
#cat install | grep 'users?$' | nl
|
#cat install | egrep 'users?$' | nl
1 for user in $user 2 for user in $users 3 for user in $users 4 step "Installing l3bashrc to users home directories" install_to_users_homes $install_l3bashrc_for_this_users 5 step "Adding l3bashrc invocation to ~/.bashrc " install_to_users_bashrc $install_l3bashrc_for_this_users 6 step "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users |
#vi install
--- /tmp/l3-saved-7810.2601.18666 2020-02-04 13:30:56.664259989 +0200 +++ install 2020-02-04 13:33:00.268322566 +0200 @@ -174,6 +174,7 @@ 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 "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.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 |
#cat install | egrep '(tar)?$' | nl
1 #!/bin/sh 2 hostname=`hostname` 3 uname -a | egrep -qi '(freebsd|darwin)' || hostname=`hostname -f` 4 ############################################################################### 5 # 6 # Set this variables before installation: 7 lilalo_user=13-10-2014 8 lab=NT-LNet 9 install_l3bashrc_for_this_users=${users:-"root user"} # users who will use l3agent and l3script 10 lilalo_context="/users/${lilalo_user}/${lab}/${hostname}" ... 146 step "Downloading l3-agent" '${wget} ${url_l3agent}; ${wget} ${url_l3config_pm}; ${wget} ${url_l3config}' 147 step "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.tar.gz; done; }' 148 step "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.gz; done; }' 149 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; }' 150 step "Installing l3bashrc to users home directories" install_to_users_homes $install_l3bashrc_for_this_users 151 step "Adding l3bashrc invocation to ~/.bashrc " install_to_users_bashrc $install_l3bashrc_for_this_users 152 step "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users 153 cd / 154 rm -rf ${temp_dir} 155 show_final_message |
#cat install | egrep '$i.(tar)?.gz' | nl
|
#cat install | egrep '$i.(tar)?.gz'
![]() |
#cat install | egrep '$i(.tar)?.gz'
![]() |
#cat install | egrep '\$i(\.tar)?\.gz'
step "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.tar.gz; done; }' step "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.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; }' |
#cat install | egrep '\$i(\.tar)?\.gz' | nl
1 step "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.tar.gz; done; }' 2 step "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.gz; done; }' 3 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; }' |
#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 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 "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.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 [:punct:] ' '
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 ... 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 Downloading perl modules for l3 agent for i in perl modules do wget url perl modules i 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 [:punct:] ' ' | tr -s ' '
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 ... 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 Downloading perl modules for l3 agent for i in perl modules do wget url perl modules i 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 [:punct:] ' ' | tr -s ' ' | tr ' ' '\n' | tr -s '\n' | sort | tr [:upper:] [:lower:] | egrep '.{3
![]() |
#cat install | tr [:punct:] ' ' | tr -s ' ' | tr ' ' '\n' | tr -s '\n' | sort | tr [:upper:] [:lower:]
![]() |
#cat install | tr [:punct:] ' ' | tr -s ' ' | tr ' ' '\n' | tr -s '\n' | sort| tr [:upper:] [:lower:] | egrep '.{3,}
![]() |
#cd /etc/cron.daily/
|
#./locate
|
#vi locate
|
#{IONICE_PRIORITY:-7}" ;;
|
#find . -emty
![]() find: unknown predicate `-emty' |
#find . -emty -type f
![]() find: unknown predicate `-emty' |
#find / -regex ".*\.jpe&g"
|
#!/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 $user 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 "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.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
Время первой команды журнала | 10:22:48 2020- 2- 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:40:10 2020- 2- 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 13.86 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 0.90 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.88 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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