/l3/users/20-10-2014/NT-Ladm/debian1.net.nt/root :1 :2 :3 :4 |
|
#cat passwd |awk -F: '{ print $1, "\t"{2}, $4, "\t"{2}, $6}; }' | sed 's/:/\t/g'
awk: line 1: syntax error at or near { awk: line 1: syntax error at or near , awk: line 1: syntax error at or near , awk: line 1: extra '}' |
#cat passwd |awk -F: '{ print $1, "\t"{2}, $4, "\t"{2}, $6}' | sed 's/:/\t/g'
awk: line 1: syntax error at or near { awk: line 1: syntax error at or near , awk: line 1: syntax error at or near , |
#cat passwd |awk -F: '{ print $1, "\t", $4, "\t", $6}' | sed 's/:/\t/g'
root 0 /root daemon 1 /usr/sbin bin 2 /bin sys 3 /dev sync 65534 /bin games 60 /usr/games man 12 /var/cache/man lp 7 /var/spool/lpd mail 8 /var/mail news 9 /var/spool/news ... backup 34 /var/backups list 38 /var/list irc 39 /var/run/ircd gnats 41 /var/lib/gnats nobody 65534 /nonexistent libuuid 101 /var/lib/libuuid Debian-exim 103 /var/spool/exim4 user 1000 /home/user sshd 65534 /var/run/sshd student 1001 /home/student |
#echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
#echo $PATH |awk -F: '{for (n=1;n<NF,n++) print &n; }'
![]() awk: line 1: syntax error at or near , |
#echo $PATH |awk -F: '{for (n=1;n<NF;n++) print &n; }'
![]() awk: 1: unexpected character '&' |
#echo $PATH |awk -F: '{for (n=1;n<NF;n++) print $n; }'
/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin |
#echo $PATH |awk -F: '{for (n=1;n<NF;n++) print $n; }' | xargs ls
/sbin: agetty fdisk ifup losetup pam_tally2 start-stop-daemon badblocks findfs init lsmod pivot_root sulogin blkid fsck insmod mii-tool plipconfig swaplabel blockdev fsck.cramfs insserv mke2fs poweroff swapoff cfdisk fsck.ext2 installkernel mkfs rarp swapon ctrlaltdel fsck.ext3 ip mkfs.bfs raw switch_root debugfs fsck.ext4 ip6tables mkfs.cramfs reboot sysctl depmod fsck.ext4dev ip6tables-restore mkfs.ext2 resize2fs tc dhclient fsck.minix ip6tables-save mkfs.ext3 rmmod telinit ... dmidecode groupmod ntpdate tcpdmatch useradd dpkg-divert grpck ntpdate-debian tcpdump userdel dpkg-preconfigure grpconv ownership tcptraceroute usermod dpkg-reconfigure grpunconv pam-auth-update tcptraceroute.db validlocale dpkg-statoverride grub-install pam_getenv traceroute vcstime e2freefrag grub-mkconfig pwck trafshow vigr e4defrag grub-mkdevicemap pwconv try-from vipw exicyclog grub-mknetdir pwunconv tunelp vpddecode exigrep grub-probe readprofile tzconfig zic exim grub-reboot remove-shell udpblast |
#echo $PATH |awk -F: '{for (n=1;n<NF;n++) print $n; }' | xargs ls > xargs.txt
|
#ls
install ip i_p passwd source wget.txt words xargs.txt |
#vi xargs.txt
|
#683 zsoelim
![]() l3script: fing: команда не найдена |
#fidg passwd
![]() l3script: fidg: команда не найдена |
#find passwd
passwd |
#locate passwd
/etc/cron.daily/passwd /etc/exim4/passwd.client /etc/pam.d/chpasswd /etc/pam.d/passwd /etc/passwd /etc/passwd- /etc/security/opasswd /home/student/sorted_passwd /home/user/names/passwd /home/user/names/.passwd ... /usr/share/vim/vim73/syntax/passwd.vim /var/backups/passwd.bak /var/lib/dpkg/info/base-passwd.list /var/lib/dpkg/info/base-passwd.md5sums /var/lib/dpkg/info/base-passwd.postinst /var/lib/dpkg/info/passwd.conffiles /var/lib/dpkg/info/passwd.list /var/lib/dpkg/info/passwd.md5sums /var/lib/dpkg/info/passwd.postinst /var/lib/dpkg/info/passwd.preinst |
#locate xargs
/usr/bin/xargs /usr/share/man/man1/xargs.1.gz |
#ls
install ip i_p passwd source wget.txt words xargs.txt |
#find xargs
![]() find: `xargs': Нет такого файла или каталога |
#locate updatedb.conf
![]() |
#locate updatedb
/etc/alternatives/updatedb /etc/alternatives/updatedb.1.gz /usr/bin/updatedb /usr/bin/updatedb.findutils /usr/share/man/man1/updatedb.1.gz /usr/share/man/man1/updatedb.findutils.1.gz /usr/share/vim/vim73/ftplugin/updatedb.vim /usr/share/vim/vim73/syntax/updatedb.vim |
#ls /etc/cron.d
![]() cron.d/ cron.daily/ |
#ls /etc/cron.daily/
apt aptitude bsdmainutils dpkg exim4-base locate logrotate man-db passwd |
#cat /etc/cron.daily/locate
#! /bin/sh set -e # cron script to update the `locatedb' database. # # Written by Ian A. Murdock <imurdock@debian.org> and # Kevin Dalley <kevin@aimnet.com> # Please consult updatedb(1) and /usr/share/doc/locate/README.Debian [ -e /usr/bin/updatedb.findutils ] || exit 0 if [ "$(id -u)" != "0" ]; then echo "You must be root." ... ionice -c $IONICE_CLASS $priority -p $$ > /dev/null 2>&1 || true ;; esac fi if getent passwd $LOCALUSER > /dev/null ; then cd / && nice -n ${NICE:-10} updatedb.findutils 2>/dev/null else echo "User $LOCALUSER does not exist." exit 1 fi |
#find / -iname "*.txt"
/usr/lib/python2.6/dist-packages/python_debian-0.1.21.egg-info/dependency_links.txt /usr/lib/python2.6/dist-packages/python_debian-0.1.21.egg-info/SOURCES.txt /usr/lib/python2.6/dist-packages/python_debian-0.1.21.egg-info/top_level.txt /usr/lib/python2.7/dist-packages/python_debian-0.1.21.egg-info/dependency_links.txt /usr/lib/python2.7/dist-packages/python_debian-0.1.21.egg-info/SOURCES.txt /usr/lib/python2.7/dist-packages/python_debian-0.1.21.egg-info/top_level.txt /usr/lib/python2.7/lib2to3/Grammar.txt /usr/lib/python2.7/lib2to3/PatternGrammar.txt /usr/lib/python2.7/LICENSE.txt /usr/lib/pymodules/python2.7/reportbug-6.4.4.egg-info/dependency_links.txt ... /usr/share/vim/vim73/doc/message.txt /usr/share/vim/addons/doc/matchit.txt /var/lib/exim4/berkeleydbvers.txt /home/user/text/hello-vi.txt /home/user/text/comment-me.txt /home/user/text/unixoid.orig.txt /home/user/text/unixoid.err.txt /root/xargs.txt /root/wget.txt /opt/4.txt |
#find / -type f -user student
![]() /tmp/console-cyrillic /tmp/sysctl.conf /tmp/screenrc /tmp/logrotate.conf /tmp/hosts.deny /tmp/bash.bashrc /tmp/blkid.tab.old /tmp/crontab /tmp/email-addresses /tmp/inputrc ... /home/student/sorted /home/student/.profile /home/student/sorted_passwd /home/student/.viminfo /home/student/.bash_logout /home/student/errlog find: `/proc/11102/task/11102/fd/5': Нет такого файла или каталога find: `/proc/11102/task/11102/fdinfo/5': Нет такого файла или каталога find: `/proc/11102/fd/5': Нет такого файла или каталога find: `/proc/11102/fdinfo/5': Нет такого файла или каталога |
#find / -type f -user student 2>/dev/null
/tmp/console-cyrillic /tmp/sysctl.conf /tmp/screenrc /tmp/logrotate.conf /tmp/hosts.deny /tmp/bash.bashrc /tmp/blkid.tab.old /tmp/crontab /tmp/email-addresses /tmp/inputrc ... /home/student/unsorted /home/student/.bashrc /home/student/.bash_history /home/student/.lesshst /home/student/sorted /home/student/.profile /home/student/sorted_passwd /home/student/.viminfo /home/student/.bash_logout /home/student/errlog |
#cd / | find -type f -user student 2>/dev/null
|
#find / -type f -user student -mtime -2 2>/dev/null
![]() /tmp/console-cyrillic /tmp/sysctl.conf /tmp/screenrc /tmp/logrotate.conf /tmp/hosts.deny /tmp/bash.bashrc /tmp/blkid.tab.old /tmp/crontab /tmp/email-addresses /tmp/inputrc ... /tmp/trafshow /tmp/ucf.conf /home/student/file /home/student/unsorted /home/student/.bash_history /home/student/.lesshst /home/student/sorted /home |