/l3/users/11-01-2010/nt-ladm/debian1.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 |
|
#[root@fbsd3:ports]# cd /usr/ports/shells/bash-completion
[root@fbsd3:ports]# make search name=bash-completion Port: bash-completion-20060301_2 Path: /usr/ports/shells/bash-completion Info: Programmable completion library for Bash 2.04 and up Maint: kirk@strauser.com B-deps: R-deps: bash-3.2.25 gettext-0.16.1_3 libiconv-1.11_1 WWW: http://www.caliban.org/bash/index.shtml |
#[root@fbsd3:bash-completion]# . ~/.bashrc
if [ -f . /usr/local/etc/bash_completion; then fi fi fi ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "~/.bashrc" 5 lines, 130 characters written |
#[root@fbsd3:cowsay]# make install
[root@fbsd3:bash-completion]# cd /usr/ports/games/cowsay/ |
#[root@fbsd3:cowsay]# make clean
[root@fbsd3:cowsay]# echo Hello | cowsay bash: /usr/local/bin/cowsay: No such file or directory ===> Cleaning for cowsay-3.03_1 |
#[root@fbsd3:cowsay]# echo Hello | cowsay
[root@fbsd3:cowsay]# make install ===> Vulnerability check disabled, database not found ===> Extracting for cowsay-3.03_1 => MD5 Checksum OK for cowsay-3.03.tar.gz. => SHA256 Checksum OK for cowsay-3.03.tar.gz. ===> cowsay-3.03_1 depends on file: /usr/local/bin/perl5.8.8 - found ===> Patching for cowsay-3.03_1 ===> cowsay-3.03_1 depends on file: /usr/local/bin/perl5.8.8 - found ===> Applying FreeBSD patches for cowsay-3.03_1 ===> cowsay-3.03_1 depends on file: /usr/local/bin/perl5.8.8 - found ... ===> Compressing manual pages for cowsay-3.03_1 ===> Registering installation for cowsay-3.03_1 _______ < Hello > ------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || |
#[root@fbsd3:cowsay]# pkg_delete cowsay-3.03_1
![]() [root@fbsd3:cowsay]# pkg_delete co compositeproto-0.4 cowsay-3.03_1 |
#[root@fbsd3:cowsay]# exit
![]() exit Connection to 192.168.16.23 closed. |
#. /etc/bash.bashrc
18 # set a fancy prompt (non-color, overwrite the one in /etc/profile)$ 19 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '$ 20 $ 21 # Commented out, don't overwrite xterm -T "title" -n "icontitle" by defaa ult.$ 22 # If this is an xterm set the title to user@host:dir$ 23 #case "$TERM" in$ 24 #xterm*|rxvt*)$ 25 # PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'$ 26 # ;;$ 27 #*)$ 28 # ;;$ 29 #esac$ 30 $ 31 # enable bash completion in interactive shells$ 32 if [ -f /etc/bash_completion ]; then$ 33 . /etc/bash_completion$ 34 fi$ ~ "/etc/bash.bashrc" 34L, 1068C written root@debian1:/tmp# . ~/.bashrc |
#apt-get install bind
![]() [root@debian1:tmp]# apt-get install bind bind bind-doc bind9-doc bindgraph bind-dev bind9 bind9-host bind bind-doc bind9-doc bindgraph bind-dev bind9 bind9-host |
#apt-get install bind
![]() bind bind-doc bind9-doc bindgraph bind-dev bind9 bind9-host |
#apt-cache
[root@debian1:tmp]# apt-get autoclean clean install update build-dep dist-upgrade remove upgrade check dselect-upgrade source add dump madison rdepends showpkg unmet depends dumpavail pkgnames search showsrc xvcg dotty gencaches policy show stats |
#. /et
![]() [root@debian1:tmp]# apt-cache |
#date
Mon Jan 11 17:12:17 EET 2010 |
#manintro
![]() [root@debian1:bin]# namei usage: namei [-mx] pathname [pathname ...] bash: manintro: command not found |
#man
![]() |
#man
![]() |
#man -a intro
![]() |
#pwd
/bin |
#~/
![]() bash: /root/: is a directory |
#pwd
/bin |
#~
![]() bash: /root: is a directory |
#pwd
/bin |
#cd
|
#pwd
/root |
#man mkfifo
|
#set
BASH=/bin/bash BASH_ARGC=() BASH_ARGV=() BASH_LINENO=() BASH_SOURCE=() BASH_VERSINFO=([0]="3" [1]="1" [2]="17" [3]="1" [4]="release" [5]="i486-pc-linux-gnu") BASH_VERSION='3.1.17(1)-release' COLUMNS=80 DIFFNAME=115222705270348897-1263190788_1263219092_root_.vimrc.diff DIR= ... MACHTYPE=i486-pc-linux-gnu MAIL=/var/mail/root MAILCHECK=60 OLDPWD=/bin OPTERR=1 OPTIND=1 OSTYPE=linux-gnu PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PIPESTATUS=([0]="0") PPID=1913 |
#patch
![]() |
#LS
![]() [root@debian1:tmp]# echo $ $BASH $IFS $RANDOM $BASH_ARGC $L3_HOME $SECONDS $BASH_ARGV $L3_PARENT_TTY $SHELL $BASH_COMMAND $L3_SESSION_ID $SHELLOPTS $BASH_COMPLETION $L3_TAMPERED_EDITORS $SHLVL $BASH_COMPLETION_DIR $LANG $SSH_CLIENT $BASH_LINENO $LINENO $SSH_CONNECTION $BASH_SOURCE $LINES $SSH_TTY $BASH_SUBSHELL $LOGNAME $STY ... $EUID $OPTIND $a $GROUPS $OSTYPE $bash205 $HISTCMD $PATH $bash205b $HISTFILE $PIPESTATUS $bash3 $HISTFILESIZE $PPID $editor_file $HISTSIZE $PS1 $editor_name $HOME $PS2 $old_file $HOSTNAME $PS4 $HOSTTYPE $PWD bash: LS: command not found |
#echo $
![]() $_ $HISTFILESIZE $OPTIND $BASH $HISTSIZE $OSTYPE $BASH_ARGC $HOME $PATH $BASH_ARGV $HOSTNAME $PIPESTATUS $BASH_COMMAND $HOSTTYPE $PPID $BASH_LINENO $IFS $PS1 $BASH_SOURCE $L3_HOME $PS2 $BASH_SUBSHELL $L3_PARENT_TTY $PS4 $BASH_VERSINFO $L3_SESSION_ID $PWD $BASH_VERSION $L3_TAMPERED_EDITORS $RANDOM ... $DIFFNAME $LINES $SHELLOPTS $DIR $LOGNAME $SHLVL $DIRSTACK $LS_COLORS $SSH_CLIENT $editor_file $LS_OPTIONS $SSH_CONNECTION $editor_name $MACHTYPE $SSH_TTY $ERR $MAIL $TERM $EUID $MAILCHECK $TIME $GROUPS $old_file $UID $HISTCMD $OLDPWD $USER $HISTFILE $OPTERR |
#echo $path
|
#mc
![]() |
#man ed
|
#vim /etc/hosts
![]() |
#man tracert
![]() |
#man trace
![]() |
#man route
|
#ls
123 2009 fileperm1 hard_link_to_file_copy 2 bind find passwd 2007 fifo hard_link_to_file v218742 2008 filename1 hard_link_to_file_backup zmanDW1PTG |
#touch a
|
#touch abc
|
#touch abcd
|
#echo *
[root@debian1:tmp]# touch abcde 123 2 2007 2008 2009 a ab abc abcd abcde bind fifo filename1 fileperm1 find hard_link_to_file hard_link_to_file_backup hard_link_to_file_copy passwd v218742 zmanDW1PTG |
#touch abc
|
#echo *
1234 a ab abc |
#ls
123 2008 ab abcde filename1 hard_link_to_file passwd 2 2009 abc bind fileperm1 hard_link_to_file_backup v218742 2007 a abcd fifo find hard_link_to_file_copy zmanDW1PTG |
#echo .
. .. .bash_history .bash_profile .bashrc .gconf .gconfd .l3rc .lesshst .lilalo .mozilla .profile .ssh .viminfo .vimrc |
#echo *
[root@debian1:tmp]# ls -1 123 2 2007 2008 2009 a ab abc abcd ... filename1 fileperm1 find hard_link_to_file hard_link_to_file_backup hard_link_to_file_copy passwd v218742 zmanDW1PTG 123 2 2007 2008 2009 a ab abc abcd abcde bind fifo filename1 fileperm1 find hard_link_to_file hard_link_to_file_backup hard_link_to_file_copy passwd v218742 zmanDW1PTG |
#echo -a .*
[root@debian1:tmp]# echo .* . .. .ICE-unix .X0-lock .X11-unix .gdm_socket -a . .. .ICE-unix .X0-lock .X11-unix .gdm_socket |
#echo .* *
. .. .bash_history .bash_profile .bashrc .gconf .gconfd .l3rc .lesshst .lilalo .mozilla .profile .ssh .viminfo .vimrc 1234 a ab abc |
#echo .'
![]() > > > |
#echo ..* *
[root@debian1:tmp]# echo .* * . .. .ICE-unix .X0-lock .X11-unix .gdm_socket 123 2 2007 2008 2009 a ab abc abcd abcde bind fifo filename1 fileperm1 find hard_link_to_file hard_link_to_file_backup hard_link_to_file_copy passwd v218742 zmanDW1PTG .. 123 2 2007 2008 2009 a ab abc abcd abcde bind fifo filename1 fileperm1 find hard_link_to_file hard_link_to_file_backup hard_link_to_file_copy passwd v218742 zmanDW1PTG |
#echo .'* *
![]() -E disable interpretation of backslash escapes (default) --help display this help and exit --version output version information and exit If -e is in effect, the following sequences are recognized: \0NNN the character whose ASCII code is NNN (octal) \\ backslash \a alert (BEL) \b backspace \c suppress trailing newline ... <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.tion of backslash escapes SEE ALSOr carriage returnetation of backslash escapes (default) The full documentation for echo is maintained as a Texinfo manual. If the info and echo programs are properly installed at your site, the command \v vertical tab info echorsion information and exit NOTE: your shell may have its own version of echo, which usually super‐ should give you access to the complete manual.r to your shell’s docu‐ |
#echo .
![]() |
#echo .'* *
![]() |
#echo .
|
#echo ?
[root@debian1:tmp]# echo .[^.]* * .ICE-unix .X0-lock .X11-unix .gdm_socket 123 2 2007 2008 2009 a ab abc abcd abcde bind fifo filename1 fileperm1 find hard_link_to_file hard_link_to_file_backup hard_link_to_file_copy passwd v218742 zmanDW1PTG 2 a |
#echo .[^.]*
[root@debian1:~]# echo .* * . .. .bash_history .bash_profile .bashrc .gconf .gconfd .l3rc .lesshst .lilalo .mozilla .profile .ssh .viminfo .vimrc 1234 a ab abc .bash_history .bash_profile .bashrc .gconf .gconfd .l3rc .lesshst .lilalo .mozilla .profile .ssh .viminfo .vimrc |
#echo .[^.]* *
.bash_history .bash_profile .bashrc .gconf .gconfd .l3rc .lesshst .lilalo .mozilla .profile .ssh .viminfo .vimrc 1234 a ab abc |
#echo ??
ab |
#ls -ld ?
[root@debian1:tmp]# ls -l ? -rw-r--r-- 1 root root 0 Jan 12 10:11 a 2: total 0 drwxr-xr-x 2 root root 48 Jan 11 12:03 2 -rw-r--r-- 1 root root 0 Jan 12 10:11 a |
#touch '-1'
![]() touch: invalid option -- 1 Попробуйте `touch --help' для получения более подробного описания. |
#ls -ld ???
[root@debian1:tmp]# ls -ld ?? -rw-r--r-- 1 root root 0 Jan 12 10:11 ab drwxr-xr-x 2 root root 48 Jan 11 16:32 123 -rw-r--r-- 1 root root 0 Jan 12 10:11 abc |
#ls -ld ????
drwxr-xr-x 14 root root 336 Jan 11 12:06 2007 drwxr-xr-x 14 root root 336 Jan 11 12:06 2008 drwxr-xr-x 14 root root 336 Jan 11 12:06 2009 -rw-r--r-- 1 root root 0 Jan 12 10:11 abcd -rw-r--r-- 1 root root 10464 Jan 11 16:56 bind prw-r--r-- 1 root root 0 Jan 11 11:59 fifo -rw-r--r-- 1 root root 301812 Jan 11 16:48 find |
#ls -ld [^0-9]
[root@debian1:tmp]# ls -ld [^0-9] -rw-r--r-- 1 root root 0 Jan 12 10:11 a -rw-r--r-- 1 root root 0 Jan 12 10:11 a |
#ls
123 2008 ab abcde filename1 hard_link_to_file passwd 2 2009 abc bind fileperm1 hard_link_to_file_backup v218742 2007 a abcd fifo find hard_link_to_file_copy zmanDW1PTG |
#ls -ld [^0-9]*[^0-9]
[root@debian1:tmp]# ls -ld [^0-9]* -rw-r--r-- 1 root root 0 Jan 12 10:11 a -rw-r--r-- 1 root root 0 Jan 12 10:11 ab -rw-r--r-- 1 root root 0 Jan 12 10:11 abc -rw-r--r-- 1 root root 0 Jan 12 10:11 abcd -rw-r--r-- 1 root root 0 Jan 12 10:11 abcde -rw-r--r-- 1 root root 10464 Jan 11 16:56 bind prw-r--r-- 1 root root 0 Jan 11 11:59 fifo -rw-r--r-- 1 root root 4825 Jan 11 14:42 filename1 -rw-r--r-- 1 root root 0 Jan 11 16:30 fileperm1 ... -rw-r--r-- 1 root root 0 Jan 12 10:11 abcd -rw-r--r-- 1 root root 0 Jan 12 10:11 abcde -rw-r--r-- 1 root root 10464 Jan 11 16:56 bind prw-r--r-- 1 root root 0 Jan 11 11:59 fifo -rw-r--r-- 1 root root 301812 Jan 11 16:48 find -rw-r--r-- 1 root root 2652 Jan 11 11:55 hard_link_to_file -rw-r--r-- 1 root root 2652 Jan 11 12:08 hard_link_to_file_backup -rw-r--r-- 1 root root 2652 Jan 11 12:07 hard_link_to_file_copy -rw-r--r-- 1 root root 9347 Jan 11 17:02 passwd -rw------- 1 root root 1493 Jan 12 09:42 zmanDW1PTG |
#ls a?
[root@debian1:tmp]# ls a?.doc ls: a?.doc: No such file or directory ab |
#ls
![]() 123 2008 ab abcde filename1 hard_link_to_file passwd 2 2009 abc bind fileperm1 hard_link_to_file_backup v218742 2007 a abcd fifo find hard_link_to_file_copy zmanDW1PTG |
#echo *
[root@debian1:tmp]# ls * a abcd fifo find hard_link_to_file_copy ab abcde filename1 hard_link_to_file passwd abc bind fileperm1 hard_link_to_file_backup zmanDW1PTG 123: 2: 2007: 01 02 03 04 05 06 07 08 09 10 11 12 2008: 01 02 03 04 05 06 07 08 09 10 11 12 2009: 01 02 03 04 05 06 07 08 09 10 11 12 v218742: 123 2 2007 2008 2009 a ab abc abcd abcde bind fifo filename1 fileperm1 find hard_link_to_file hard_link_to_file_backup hard_link_to_file_copy passwd v218742 zmanDW1PTG |
#ls *
a abcd fifo find hard_link_to_file_copy ab abcde filename1 hard_link_to_file passwd abc bind fileperm1 hard_link_to_file_backup zmanDW1PTG 123: 2: 2007: 01 02 03 04 05 06 07 08 09 10 11 12 2008: 01 02 03 04 05 06 07 08 09 10 11 12 2009: 01 02 03 04 05 06 07 08 09 10 11 12 v218742: |
#echo /*/*/*/*/* | xargs ls -l
![]() lrwxrwxrwx 1 root root 17 Jul 4 2008 /proc/1/cwd/lib/libncurses.so.5 -> libncurses.so.5.5 -rw-r--r-- 1 root root 263040 Oct 19 2006 /proc/1/cwd/lib/libncurses.so.5.5 lrwxrwxrwx 1 root root 18 Jul 4 2008 /proc/1/cwd/lib/libncursesw.so.5 -> libncursesw.so.5.5 -rw-r--r-- 1 root root 308288 Oct 19 2006 /proc/1/cwd/lib/libncursesw.so.5.5 -rw-r--r-- 1 root root 72452 Jan 19 2008 /proc/1/cwd/lib/libnsl-2.3.6.so lrwxrwxrwx 1 root root 15 Jul 4 2008 /proc/1/cwd/lib/libnsl.so.1 -> libnsl-2.3.6.so -rw-r--r-- 1 root root 26332 Jan 19 2008 /proc/1/cwd/lib/libnss_compat-2.3.6.so lrwxrwxrwx 1 root root 22 Jul 4 2008 /proc/1/cwd/lib/libnss_compat.so.2 -> libnss_compat-2.3.6.so -rw-r--r-- 1 root root 17840 Jan 19 2008 /proc/1/cwd/lib/libnss_dns-2.3.6.so lrwxrwxrwx 1 root root 19 Jul 4 2008 /proc/1/cwd/lib/libnss_dns.so.2 -> libnss_dns-2.3.6.so ... -rwxr-xr-x 1 root root 5980 Mar 7 2007 /proc/1/cwd/sbin/logsave -rwxr-xr-x 1 root root 24884 Feb 21 2007 /proc/1/cwd/sbin/losetup lrwxrwxrwx 1 root root 10 Jul 4 2008 /proc/1/cwd/sbin/lsmod -> /bin/lsmod lrwxrwxrwx 1 root root 15 Jul 4 2008 /proc/1/cwd/sbin/lsmod.modutils -> insmod.modutils -rwxr-xr-x 1 root root 10776 Dec 4 2005 /proc/1/cwd/sbin/mii-tool -rwxr-xr-x 1 root root 39616 Mar 7 2007 /proc/1/cwd/sbin/mke2fs -rwxr-xr-x 1 root root 5116 Feb 21 2007 /proc/1/cwd/sbin/mkfs -rwxr-xr-x 1 root root 14560 Feb 21 2007 /proc/1/cwd/sbin/mkfs.cramfs -rwxr-xr-x 1 root root 39616 Mar 7 2007 /proc/1/cwd/sbin/mkfs.ext2 -rwxr-xr-x 1 root root 39616 Mar 7 2007 /proc/1/cwd/sbin/mkfs.ext3 |
#\
![]() (reverse-i-search)`mkdir ': > |
#mkdir -vp 200{4,5,6}/{0{1,2,3,4,5,6,7,8,9},1{0,1,2}}
[root@debian1:tmp]# history | grep mkdir 224 mkdir 1 228 mkdir 1/2/3/4/5 229 mkdir -pv 1/2/3/4/5 238 mkdir -vp 200{7,8,9}/{0{1,2,3,4,5,6,7,8,9},1{0,1,2}} 274 mkdir 123 377 history | grep mkdir mkdir: created directory `2004' mkdir: created directory `2004/01' mkdir: created directory `2004/02' ... mkdir: created directory `2006/03' mkdir: created directory `2006/04' mkdir: created directory `2006/05' mkdir: created directory `2006/06' mkdir: created directory `2006/07' mkdir: created directory `2006/08' mkdir: created directory `2006/09' mkdir: created directory `2006/10' mkdir: created directory `2006/11' mkdir: created directory `2006/12' |
#ps aux | awk {print$2}
[root@debian1:tmp]# ps aux | less USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 1960 648 ? Ss Jan09 0:00 init [2] root 2 0.0 0.0 0 0 ? S Jan09 0:00 [migration/ 0] root 3 0.0 0.0 0 0 ? SN Jan09 0:00 [ksoftirqd/ 0] root 4 0.0 0.0 0 0 ? S< Jan09 0:00 [events/0] root 5 0.0 0.0 0 0 ? S< Jan09 0:00 [khelper] root 6 0.0 0.0 0 0 ? S< Jan09 0:00 [kthread] ... root 8364 0.0 0.2 5060 1368 ttyp1 T 09:41 0:00 man -a intro root 8472 0.0 0.1 4872 824 ttyp1 T 09:42 0:00 pager -s root 8719 0.0 0.1 4672 624 ttyp1 T 10:09 0:00 ed root 9155 0.3 0.3 7708 2352 ? Ss 10:17 0:00 sshd: root@ttyp6 root 9165 0.0 0.1 4716 680 ttyp6 Ss+ 10:18 0:00 script -f -q /root/.lilalo//10051136943226131377-1263284292.script root 9204 0.0 0.0 4844 472 ttyp6 S+ 10:18 0:00 script -f -q /root/.lilalo//10051136943226131377-1263284292.script root 9205 0.0 0.4 6568 2592 ttyp7 Ss 10:18 0:00 bash -i root 9252 0.0 0.1 5564 1016 ttyp7 S+ 10:18 0:00 screen -x root 9442 0.0 0.1 2236 892 ttyp9 R+ 10:21 0:00 ps aux root 9443 0.0 0.0 1808 432 ttyp9 R+ 10:21 0:00 awk {print} |
#touch \-1
![]() [root@debian1:tmp]# touch -1 touch: invalid option -- 1 Try `touch --help' for more information. touch: invalid option -- 1 Try `touch --help' for more information. |
#touch -- -1
[root@debian1:tmp]# touch "-1" touch: invalid option -- 1 Try `touch --help' for more information. |
#ls -l
total 344 -rw-r--r-- 1 root root 0 Jan 12 10:23 -1 drwxr-xr-x 2 root root 48 Jan 11 16:32 123 drwxr-xr-x 2 root root 48 Jan 11 12:03 2 drwxr-xr-x 14 root root 336 Jan 12 10:21 2004 drwxr-xr-x 14 root root 336 Jan 12 10:21 2005 drwxr-xr-x 14 root root 336 Jan 12 10:21 2006 drwxr-xr-x 14 root root 336 Jan 11 12:06 2007 drwxr-xr-x 14 root root 336 Jan 11 12:06 2008 drwxr-xr-x 14 root root 336 Jan 11 12:06 2009 ... prw-r--r-- 1 root root 0 Jan 11 11:59 fifo -rw-r--r-- 1 root root 4825 Jan 11 14:42 filename1 -rw-r--r-- 1 root root 0 Jan 11 16:30 fileperm1 -rw-r--r-- 1 root root 301812 Jan 11 16:48 find -rw-r--r-- 1 root root 2652 Jan 11 11:55 hard_link_to_file -rw-r--r-- 1 root root 2652 Jan 11 12:08 hard_link_to_file_backup -rw-r--r-- 1 root root 2652 Jan 11 12:07 hard_link_to_file_copy -rw-r--r-- 1 root root 9347 Jan 11 17:02 passwd drwx------ 2 root root 48 Jan 11 14:15 v218742 -rw------- 1 root root 1493 Jan 12 09:42 zmanDW1PTG |
|