| /l3/users/14-01-2013/NT-BSDadm/freebsd1.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
|
#cat /etc/passwd|tr -c a \ |tr
|
|
#cat /etc/passwd|tr -c a b|tr -d b
|
|
#cat /etc/passwd|tr -c a b
|
|
#cat /etc/passwd|tr -c a b |tr
|
|
#cat /etc/passwd|tr -c a b |tr -d b|wc -c
40
|
|
#ps -aux
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 11 99.0 0.0 0 8 ?? RL Mon01AM 3081:42.01 [idle] root 0 0.0 0.0 0 56 ?? DLs Mon01AM 0:00.28 [kernel] root 1 0.0 0.1 2912 484 ?? ILs Mon01AM 0:00.01 /sbin/init -- root 2 0.0 0.0 0 8 ?? DL Mon01AM 0:07.90 [g_event] root 3 0.0 0.0 0 8 ?? DL Mon01AM 0:45.53 [g_up] root 4 0.0 0.0 0 8 ?? DL Mon01AM 3:19.48 [g_down] root 5 0.0 0.0 0 8 ?? DL Mon01AM 0:00.00 [sctp_iterator] root 6 0.0 0.0 0 8 ?? DL Mon01AM 0:00.00 [xpt_thrd] root 7 0.0 0.0 0 8 ?? DL Mon01AM 0:00.19 [pagedaemon] ... root 7259 0.0 0.3 3812 1740 0 I 3:06PM 0:00.01 su root 7260 0.0 0.5 4568 2384 0 I 3:06PM 0:00.08 su (bash) root 7890 0.0 0.2 3352 992 0 I+ 5:46PM 0:00.29 script -t 0 -q /root/.lilalo//3826143252267914701-1358264801.scri root 7926 0.0 0.5 4568 2448 1 Is+ 5:46PM 0:00.54 l3script (bash) user 7375 0.0 0.5 4568 2392 2 Is 3:11PM 0:00.05 -bash (bash) root 11335 0.0 0.3 3812 1740 2 I 1:00PM 0:00.01 su root 11336 0.0 0.5 4568 2384 2 I 1:00PM 0:00.01 su (bash) root 11337 0.0 0.2 3352 992 2 S+ 1:00PM 0:00.04 script -t 0 -q /root/.lilalo//19996124841027319967-1358334034.scr root 11373 0.0 0.5 4568 2440 3 Ss 1:00PM 0:00.07 l3script (bash) root 12077 0.0 0.2 3432 1220 3 R+ 1:44PM 0:00.00 ps -aux |
|
#cat /etc/passwd |awk -F: '{ if ($3>999) print; }'
nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin user:*:1001:1001:User &:/home/user:/usr/local/bin/bash |
|
#cat /etc/passwd |awk -F: '{ if ($3>999) print 3}'
65534 1001 |
|
#echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/user/bin |
|
#echo $PATH|awk -F: '{for (n=1;n>=NF;n++) print $n;}'
|
|
#echo $PATH|awk -F '{for (n=1;n>=NF;n++) print $n;}'
|
|
#echo $PATH|awk -F : '{for (n=1;n>=NF;n++) print $n;}'|xargs ls
|
|
#echo $PATH|awk -F : '{for (n=1;n<NF;n++) print $n;}'|xargs ls
/bin: [ csh ed link pgrep realpath sh unlink cat date expr ln pkill red sleep uuidgen chflags dd getfacl ls ps rm stty chio df hostname mkdir pwait rmail sync chmod domainname kenv mv pwd rmdir tcsh cp echo kill pax rcp setfacl test /home/user/bin: bigwork signal_trap x y z /sbin: ... ctm_rmail kbdcontrol nfsuserd rrenumd ypbind ctm_smail kbdmap ngctl rtadvd ypinit daemon keyserv nghook rtprio yppoll dconschat kgmon nologin rtsold yppush devinfo kgzip nscd rwhod ypserv digictl kldxref ntp-keygen sa ypset diskinfo kstash ntpd sade zdb dnssec-dsfromkey ktutil ntpdate sdpcontrol zdump dnssec-keyfromlabel l2control ntpdc sdpd zic dnssec-keygen l2ping ntptime sendmail zzz |
|
#echo $PATH|awk -F : '{for (n=1;n<=NF;n++) print $n;}'
/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /home/user/bin |
|
#locat grep
l3script: locat: command not found |
|
#locategrep
/bin/pgrep /rescue/pgrep /usr/bin/bzegrep /usr/bin/bzfgrep /usr/bin/bzgrep /usr/bin/egrep /usr/bin/fgrep /usr/bin/grep /usr/bin/pgrep /usr/bin/zegrep ... /usr/share/man/man1/bzegrep.1.gz /usr/share/man/man1/bzfgrep.1.gz /usr/share/man/man1/bzgrep.1.gz /usr/share/man/man1/egrep.1.gz /usr/share/man/man1/fgrep.1.gz /usr/share/man/man1/grep.1.gz /usr/share/man/man1/pgrep.1.gz /usr/share/man/man1/zegrep.1.gz /usr/share/man/man1/zfgrep.1.gz /usr/share/man/man1/zgrep.1.gz |
|
#locate -n 10
locate: illegal option -- n usage: locate [-0Scims] [-l limit] [-d database] pattern ... default database: `/var/db/locate.database' or $LOCATE_PATH |
|
#locate -n10 grep
locate: illegal option -- n usage: locate [-0Scims] [-l limit] [-d database] pattern ... default database: `/var/db/locate.database' or $LOCATE_PATH |
|
#locate -l 10p
/bin/pgrep /rescue/pgrep /usr/bin/bzegrep /usr/bin/bzfgrep /usr/bin/bzgrep /usr/bin/egrep /usr/bin/fgrep /usr/bin/grep /usr/bin/pgrep /usr/bin/zegrep locate: [show only 10 lines] |
|
#man find
|
|
#find / -size +10240 -ls -n10
find: -n: unknown option |
|
#find / -size +100Mb -ls
566673 351008 -r--r--r-- 1 root wheel 179590505 Jan 15 2011 /usr/local/share/doc/freebsd/en_US.ISO8859-1/books/handbook/book.ps |
|
#find / -name find\*
/usr/bin/find /usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp ... /usr/local/lib/gcc42/include/c++/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp /usr/local/lib/gcc42/include/c++/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp /usr/local/lib/gcc42/include/c++/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp /usr/local/lib/gcc42/include/c++/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp /usr/local/man/man1/find2perl.1.gz /usr/share/examples/find_interface /usr/share/examples/find_interface/find_interface.c /usr/share/man/man1/find.1.gz /usr/share/man/cat1/find.1.gz ^C |
|
#find / -name find\*|grep find --color
/usr/bin/find /usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp ... /usr/local/share/ri/1.8/system/RDoc/find_comment-c.yaml /usr/local/share/ri/1.8/system/REXML/Node/find_first_recursive-i.yaml /usr/local/share/ri/1.8/system/RI/RiReader/find_class_by_name-i.yaml /usr/local/share/ri/1.8/system/RI/RiReader/find_classes_in-i.yaml /usr/local/share/ri/1.8/system/RI/RiReader/find_methods-i.yaml /usr/local/share/ri/1.8/system/RI/RiReader/find_names_in-i.yaml /usr/local/share/ri/1.8/system/Rinda/TupleBag/TupleBin/find-i.yaml /usr/local/share/ri/1.8/system/Rinda/TupleBag/find-i.yaml /usr/local/share/ri/1.8/system/Rinda/TupleBag/find_all-i.yaml ^C |
|
#find / -name find\*|grep find --color|more
|
|
#find / -name find\*|grep find --color
/usr/bin/find /usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp /usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp ... /usr/local/share/ri/1.8/system/RDoc/find_comment-c.yaml /usr/local/share/ri/1.8/system/REXML/Node/find_first_recursive-i.yaml /usr/local/share/ri/1.8/system/RI/RiReader/find_class_by_name-i.yaml /usr/local/share/ri/1.8/system/RI/RiReader/find_classes_in-i.yaml /usr/local/share/ri/1.8/system/RI/RiReader/find_methods-i.yaml /usr/local/share/ri/1.8/system/RI/RiReader/find_names_in-i.yaml /usr/local/share/ri/1.8/system/Rinda/TupleBag/TupleBin/find-i.yaml /usr/local/share/ri/1.8/system/Rinda/TupleBag/find-i.yaml /usr/local/share/ri/1.8/system/Rinda/TupleBag/find_all-i.yaml ^C |
|
#find -E / -regex "*\.jpe?g"
find: -regex: *\.jpe?g: repetition-operator operand invalid |
|
#find -E / -regex ".\.jpe?g"
/usr/local/share/doc/tiff/images/bali.jpg /usr/local/share/doc/tiff/images/cover.jpg /usr/local/share/doc/tiff/images/jello.jpg /usr/local/share/doc/tiff/images/quad.jpg /usr/local/share/doc/tiff/images/smallliz.jpg /usr/local/share/gtk-2.0/demo/background.jpg ^C |
|
#find / -size +10240 -s
find: -s: unknown option |
|
#find / -size +10240 -ls
353312 10656 -r-xr-xr-x 1 root wheel 5432832 Feb 18 2011 /usr/libexec/cc1 353313 11616 -r-xr-xr-x 1 root wheel 5925224 Feb 18 2011 /usr/libexec/cc1plus 353314 10784 -r-xr-xr-x 1 root wheel 5495040 Feb 18 2011 /usr/libexec/cc1obj 565386 11040 -r--r--r-- 1 root wheel 5620654 Jan 15 2011 /usr/local/share/doc/freebsd/en_US.ISO8859-1/books/handbook/book.html 566673 351008 -r--r--r-- 1 root wheel 179590505 Jan 15 2011 /usr/local/share/doc/freebsd/en_US.ISO8859-1/books/handbook/book.ps 566605 20800 -r--r--r-- 1 root wheel 10624592 Jan 15 2011 /usr/local/share/doc/freebsd/en_US.ISO8859-1/books/handbook/book.pdf 636123 10624 -r--r--r-- 1 root wheel 5414200 Jan 15 2011 /usr/local/share/doc/freebsd/ru_RU.KOI8-R/books/handbook/book.html 601141 12640 -rw-r--r-- 1 root wheel 6443628 Feb 2 2011 /usr/local/lib/libgtk-x11-2.0.a 684785 31456 -r--r--r-- 1 root wheel 16077916 Jul 5 2012 /usr/local/lib/gcc42/include/c++/i386-portbld-freebsd8.2/bits/stdc++.h.gch/O0g.gch 684786 31456 -r--r--r-- 1 root wheel 16073820 Jul 5 2012 /usr/local/lib/gcc42/include/c++/i386-portbld-freebsd8.2/bits/stdc++.h.gch/O2g.gch 710298 62752 -r--r--r-- 1 root wheel 32098696 Jul 5 2012 /usr/local/lib/gcc42/include/c++/i386-portbld-freebsd8.2/bits/stdtr1c++.h.gch/O2g.gch 849686 11232 -rw-r--r-- 1 root wheel 5724767 Nov 27 2010 /usr/src/sys/contrib/octeon-sdk/cvmx-csr-db.c 408673 12480 -rw-r--r-- 1 root wheel 6357176 Apr 6 2010 /usr/ports/cad/opencascade/pkg-plist ^C |
|
#find ./ -atime +2
./.cshrc ./.mail_aliases ./.login ./.rhosts ./.mailrc ./.profile ./.shrc ./file |
|
#find ./ -atime +2 -ls
989187 4 -rw-r--r-- 1 user user 763 Jul 3 2012 ./.cshrc 989188 4 -rw------- 1 user user 383 Jul 3 2012 ./.mail_aliases 989189 4 -rw-r--r-- 1 user user 261 Jul 3 2012 ./.login 989190 4 -rw------- 1 user user 288 Jul 3 2012 ./.rhosts 989192 4 -rw-r--r-- 1 user user 343 Jul 3 2012 ./.mailrc 989193 4 -rw-r--r-- 1 user user 789 Jul 3 2012 ./.profile 989194 4 -rw-r--r-- 1 user user 984 Jul 3 2012 ./.shrc 989306 0 -rw-r--r-- 1 user user 0 Oct 1 1980 ./file |
|
#find ./ -mmin -5
./.lilalo/.report.dat |
|
#find ./ -mmin -5 -ls
989207 4 -rw-r--r-- 1 user user 336 Jan 16 15:18 ./.lilalo/.report.dat |
|
#find ./ -type l
./proj/x-project/x-symlink |
|
#find / -user user
/dev/pts/0 /dev/pts/2 /usr/home/user /usr/home/user/.cshrc /usr/home/user/.mail_aliases /usr/home/user/.login /usr/home/user/.rhosts /usr/home/user/.login_conf /usr/home/user/.mailrc /usr/home/user/.profile ... /usr/home/user/lpi_1/LPI_101-103.pdf /usr/home/user/lpi_1/LPI_101-102.pdf /usr/home/user/lpi_1/LPI_102-105.pdf /usr/home/user/lpi_1/LPI_102-106.pdf /usr/home/user/lpi_1/LPI_101-110.pdf /usr/home/user/lpi_1/LPI_101-101.pdf /usr/home/user/lpi_1/LPI_102-108.pdf /usr/home/user/lpi_1/LPI_101-104.pdf /usr/home/user/.l3rc~ /var/mail/user |
|
#ls -l
total 3044 -rw------- 1 user user 2212 Jan 16 13:00 .bash_history -rw-r--r-- 1 user wheel 10 Jul 5 2012 .bash_profile -rw-r--r-- 1 user user 65 Jul 5 2012 .bashrc -rw-r--r-- 1 user user 763 Jul 3 2012 .cshrc -rw-r--r-- 1 user user 54 Jan 15 18:39 .l3rc -rw-r--r-- 1 user user 50 Jul 5 2012 .l3rc~ -rw------- 1 user user 35 Jan 14 17:43 .lesshst drwxr-xr-x 2 user user 1024 Jan 16 12:50 .lilalo -rw-r--r-- 1 user user 261 Jul 3 2012 .login ... -rwxr-xr-x 1 user user 84663 Jan 15 13:28 pamyatka.pdf -rwxr-xr-x 1 user user 23048 Jan 15 13:28 press_any_key_to_continue.jpg drwxr-xr-x 3 user user 512 Jan 15 18:06 proj -rw-r--r-- 1 root user 51 Jan 15 18:20 sorted -rw-r--r-- 1 root user 1395 Jan 15 18:31 sorted_passwd drwxr-xr-x 2 user user 512 Jan 14 18:32 source -rw-r--r-- 1 root user 0 Jan 15 18:27 test drwxr-xr-x 2 user user 512 Jan 16 13:16 text -rwxr-xr-x 1 user user 75 Jan 15 13:28 touchlist -rw-r--r-- 1 root user 51 Jan 15 18:20 unsorted |
|
#find ./ -perm +6000
|
|
#find / -perm +6000
/usr/bin/at /usr/bin/atq /usr/bin/atrm /usr/bin/batch /usr/bin/btsockstat /usr/bin/chpass /usr/bin/chfn /usr/bin/chsh /usr/bin/ypchpass /usr/bin/ypchfn ... /usr/bin/rsh /usr/bin/su /usr/bin/wall /usr/bin/write /usr/bin/crontab /usr/bin/lpq /usr/bin/lpr /usr/bin/lprm /usr/libexec/sendmail/sendmail ^C |
|
#find / -perm +6000 -s
706670 44 -r-sr-xr-x 4 root wheel 22148 Feb 18 2011 /usr/bin/at 706670 44 -r-sr-xr-x 4 root wheel 22148 Feb 18 2011 /usr/bin/atq 706670 44 -r-sr-xr-x 4 root wheel 22148 Feb 18 2011 /usr/bin/atrm 706670 44 -r-sr-xr-x 4 root wheel 22148 Feb 18 2011 /usr/bin/batch 706677 24 -r-xr-sr-x 1 root kmem 10276 Feb 18 2011 /usr/bin/btsockstat 706692 40 -r-sr-xr-x 6 root wheel 18768 Feb 18 2011 /usr/bin/chpass 706692 40 -r-sr-xr-x 6 root wheel 18768 Feb 18 2011 /usr/bin/chfn 706692 40 -r-sr-xr-x 6 root wheel 18768 Feb 18 2011 /usr/bin/chsh 706692 40 -r-sr-xr-x 6 root wheel 18768 Feb 18 2011 /usr/bin/ypchpass 706692 40 -r-sr-xr-x 6 root wheel 18768 Feb 18 2011 /usr/bin/ypchfn ... 706914 52 -r-sr-sr-x 1 root daemon 25148 Feb 18 2011 /usr/bin/lprm 353338 1376 -r-xr-sr-x 1 root smmsp 686216 Feb 18 2011 /usr/libexec/sendmail/sendmail 588833 40 -r-sr-sr-x 1 root authpf 18784 Feb 18 2011 /usr/sbin/authpf 588918 96 -r-xr-sr-x 1 root daemon 47404 Feb 18 2011 /usr/sbin/lpc 588984 768 -r-sr-x--- 1 root network 376444 Feb 18 2011 /usr/sbin/ppp 589032 32 -r-sr-xr-x 1 root wheel 16320 Feb 18 2011 /usr/sbin/timedc 589033 48 -r-sr-xr-x 1 root wheel 23260 Feb 18 2011 /usr/sbin/traceroute 589034 44 -r-sr-xr-x 1 root wheel 20936 Feb 18 2011 /usr/sbin/traceroute6 589035 24 -r-xr-sr-x 1 root kmem 10392 Feb 18 2011 /usr/sbin/trpt ^C |
|
#find / -perm +1000
2 4 drwxrwxrwt 8 root wheel 512 Jan 16 13:16 /tmp
47104 4 drwxrwxrwt 2 root wheel 512 Jan 14 01:05 /tmp/.X11-unix
94208 4 drwxrwxrwt 2 root wheel 512 Jan 14 01:05 /tmp/.XIM-unix
70657 4 drwxrwxrwt 2 root wheel 512 Jan 14 01:05 /tmp/.ICE-unix
47106 4 drwxrwxrwt 2 root wheel 512 Jan 14 01:05 /tmp/.font-unix
^C
|
|
#find / -perm +200 -ls
706677 24 -r-xr-sr-x 1 root kmem 10276 Feb 18 2011 /usr/bin/btsockstat 706728 36 -r-xr-sr-x 1 root kmem 17852 Feb 18 2011 /usr/bin/fstat 706801 296 -r-xr-sr-x 1 root kmem 150396 Feb 18 2011 /usr/bin/netstat 706887 24 -r-xr-sr-x 1 root tty 11956 Feb 18 2011 /usr/bin/wall 706894 20 -r-xr-sr-x 1 root tty 9224 Feb 18 2011 /usr/bin/write 706912 56 -r-sr-sr-x 1 root daemon 26956 Feb 18 2011 /usr/bin/lpq 706913 60 -r-sr-sr-x 1 root daemon 29936 Feb 18 2011 /usr/bin/lpr 706914 52 -r-sr-sr-x 1 root daemon 25148 Feb 18 2011 /usr/bin/lprm 353338 1376 -r-xr-sr-x 1 root smmsp 686216 Feb 18 2011 /usr/libexec/sendmail/sendmail 588833 40 -r-sr-sr-x 1 root authpf 18784 Feb 18 2011 /usr/sbin/authpf 588918 96 -r-xr-sr-x 1 root daemon 47404 Feb 18 2011 /usr/sbin/lpc 589035 24 -r-xr-sr-x 1 root kmem 10392 Feb 18 2011 /usr/sbin/trpt ^C |
|
|