/l3/users/09-03-2011/NT-Ladm/debian1.net.nt/user :1 :2 :3 :4 :5 :6 |
|
$grep -R sendmail 1 /~
![]() grep: 1: Нет такого файла или каталога grep: /~: Нет такого файла или каталога |
$ls
?1?2?3 A:\WINDOWS\SYSTEM32\ -file1 ?kik?my Regexp.H 1cdesktop bjan file with spaces at the name modules s*tol? acpi bjen group one space term.h alloca.H bjon -hello o'Reilly another very long file name core.c *hrypun passwd **asterisk fcntl.h isdn_ttyfax.c Queen "Live at Webmley '86" |
$ll
итого 140 -rw-r--r-- 1 user user 1 Мар 9 17:34 ?1?2?3 -rw-r--r-- 1 user user 0 Мар 9 17:34 1cdesktop drwxr-xr-x 3 user user 4096 Мар 9 17:34 acpi -rw-r--r-- 1 user user 1289 Мар 9 17:34 alloca.H -rw-r--r-- 1 user user 0 Мар 10 14:24 another very long file name -rw-r--r-- 1 user user 1 Мар 9 17:34 **asterisk -rw-r--r-- 1 user user 0 Мар 10 14:27 A:\WINDOWS\SYSTEM32\ -rw-r--r-- 1 user user 0 Мар 9 17:34 bjan -rw-r--r-- 1 user user 0 Мар 9 17:34 bjen ... -rw-r--r-- 1 user user 25937 Мар 9 17:34 isdn_ttyfax.c -rw-r--r-- 1 user user 1 Мар 9 17:34 ?kik?my -rw-r--r-- 1 user user 277 Мар 9 17:34 modules -rw-r--r-- 1 user user 0 Мар 10 14:25 one space -rw-r--r-- 1 user user 0 Мар 10 14:25 o'Reilly -rw-r--r-- 1 user user 1 Мар 9 17:34 passwd -rw-r--r-- 1 user user 0 Мар 10 14:28 Queen "Live at Webmley '86" -rw-r--r-- 1 user user 7123 Мар 9 17:34 Regexp.H -rw-r--r-- 1 user user 1 Мар 9 17:34 s*tol? -rw-r--r-- 1 user user 40290 Мар 9 17:34 term.h |
$rm ./-bad-name-
![]() rm: невозможно удалить `./-bad-name-': Нет такого файла или каталога |
$touch ./-bad-name-
|
$ls
?1?2?3 A:\WINDOWS\SYSTEM32\ fcntl.h isdn_ttyfax.c Queen "Live at Webmley '86" 1cdesktop -bad-name- -file1 ?kik?my Regexp.H acpi bjan file with spaces at the name modules s*tol? alloca.H bjen group one space term.h another very long file name bjon -hello o'Reilly **asterisk core.c *hrypun passwd |
$rm ./-bad-name-
|
$grep -R save ~/*
/home/user/bigfile:# you will save yourself a lot of trouble. /home/user/names/term.h:#define save_cursor CUR Strings[128] /home/user/names/term.h:#define key_save CUR Strings[183] /home/user/names/term.h:#define key_ssave CUR Strings[212] /home/user/names/core.c: write_lock_irqsave(&bp_lock, flags); /home/user/names/core.c: write_lock_irqsave(&bp_lock, flags); /home/user/names/isdn_ttyfax.c: spin_lock_irqsave(&dev->lock, flags); /home/user/names/isdn_ttyfax.c: spin_lock_irqsave(&dev->lock, flags); /home/user/text/comment-me.txt:#if [ "${prev_saved_entry}" ]; then /home/user/text/comment-me.txt:# set saved_entry="${prev_saved_entry}" /home/user/text/comment-me.txt:# save_env saved_entry /home/user/text/comment-me.txt:# set prev_saved_entry= /home/user/text/comment-me.txt:# save_env prev_saved_entry /home/user/text/comment-me.txt:#function savedefault { /home/user/text/comment-me.txt:# saved_entry="${chosen}" /home/user/text/comment-me.txt:# save_env saved_entry |
$grep -R Windows ~/*
Бинарный файл /home/user/Light_Alloy_4.4.784_RC2_by_FAFNIR.exe совпадает /home/user/man_smb_conf:# Windows интернет имя, служащее разделу поддержки: /home/user/man_smb_conf:# Клиенты Windows ищут это сетевое имя как источник для загрузки драйвера принтера /home/user/man_smb_conf:# Раскоментируйте эту строку, чтобы разрешить отдаленное администрирование Windows печати драйверы. /home/user/sorted:Windows XP /home/user/text/comment-me.txt:menuentry "Windows 7 (loader) (on /dev/sda1)" { /home/user/unsorted:Windows XP |
$vim
![]() |
$ls
?1?2?3 A:\WINDOWS\SYSTEM32\ fcntl.h isdn_ttyfax.c Queen "Live at Webmley '86" 1cdesktop -bad-name- -file1 ?kik?my Regexp.H acpi bjan file with spaces at the name modules s*tol? alloca.H bjen group one space term.h another very long file name bjon -hello o'Reilly **asterisk core.c *hrypun passwd |
$rm -bad-name-
![]() rm: неверный ключ -- «b» Попробуйте `rm ./-bad-name-', чтобы удалить файл `-bad-name-'. Попробуйте `rm --help' для получения более подробного описания. |
$rm -- -bad-name-
|
$ls
?1?2?3 A:\WINDOWS\SYSTEM32\ -file1 ?kik?my Regexp.H 1cdesktop bjan file with spaces at the name modules s*tol? acpi bjen group one space term.h alloca.H bjon -hello o'Reilly another very long file name core.c *hrypun passwd **asterisk fcntl.h isdn_ttyfax.c Queen "Live at Webmley '86" |
$ls ~
backup file Light_Alloy_4.4.784_RC2_by_FAFNIR.exe man_smb_conf pamyatka.pdf text bigfile file1 longene-0.3.0-linux-2.6.34.tar.bz2 matrix.jpg press_any_key_to_continue.jpg touchlist bin freebsd.jpg lpi 1 names proj Desktop granata.jpg lpi 2 ogo.jpg source |
$touch `cat ~/touchlist`
|
$ls
?1?2?3 alloca.H core.c file2 ?kik?my Regexp.H 1cdesktop another very long file name directory1 file3 killall s*tol? aba **asterisk directory2 file with spaces at the name modules term.h abb A:\WINDOWS\SYSTEM32\ directory3 group one space abc bjan fcntl.h -hello o'Reilly abd bjen file1 *hrypun passwd acpi bjon -file1 isdn_ttyfax.c Queen "Live at Webmley '86" |
$cd ~
|
$ls
backup file Light_Alloy_4.4.784_RC2_by_FAFNIR.exe man_smb_conf pamyatka.pdf text bigfile file1 longene-0.3.0-linux-2.6.34.tar.bz2 matrix.jpg press_any_key_to_continue.jpg touchlist bin freebsd.jpg lpi 1 names proj Desktop granata.jpg lpi 2 ogo.jpg source |
$cat touchlist
file1 file2 file3 directory1 directory2 directory3 aba abb abc abd killall |
$cd names
|
$ls
?1?2?3 alloca.H core.c file2 ?kik?my Regexp.H 1cdesktop another very long file name directory1 file3 killall s*tol? aba **asterisk directory2 file with spaces at the name modules term.h abb A:\WINDOWS\SYSTEM32\ directory3 group one space abc bjan fcntl.h -hello o'Reilly abd bjen file1 *hrypun passwd acpi bjon -file1 isdn_ttyfax.c Queen "Live at Webmley '86" |
$echo "test `date +%Y` year. "
test 2011 year. |
$echo "test $(expr `date +%Y` + 1) year. "
test 2012 year. |
$find ~ -name core
/home/user/proj/core /home/user/lpi 1/core |
$rm -f `find ~ -name core`
|
$echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games |
$echo HHHHHHHHHHHHHHHHHHH${PATH}###########################
HHHHHHHHHHHHHHHHHHH/usr/local/bin:/usr/bin:/bin:/usr/games########################### |
$echo $(((1+2+3)*4*5+1)*5))
![]() bash: syntax error near unexpected token `)' |
$echo $(((1+2+3)*4*5+1)*5)
bash: command substitution: line 1: syntax error near unexpected token `*4*5+1' bash: command substitution: line 1: `((1+2+3)*4*5+1)*5' |
$echo $(((1+2+3)*4*5+1)*5))
![]() bash: syntax error near unexpected token `)' |
$echo $(((1+2+3)*4*5+1)*5)
bash: command substitution: line 1: syntax error near unexpected token `*4*5+1' bash: command substitution: line 1: `((1+2+3)*4*5+1)*5' |
$echo $(((1+2+3)*4*5+1)*5))
![]() bash: syntax error near unexpected token `)' |
$echo $((1+2+3)*4*5+1)*5)
![]() bash: syntax error near unexpected token `)' |
$echo $(1+2+3)*4*5+1)*5
![]() bash: syntax error near unexpected token `)' |
$echo $(((1+2+3)*4*5+1))
121 |
$echo $((((1+2+3)*4*5+1)*5)))
![]() bash: syntax error near unexpected token `)' |
$echo $((((1+2+3)*4*5+1)*5))
605 |
$A=1
|
$B=@
|
$B=2
|
$echo $((A+B))
3 |
$echo ((A+B))
![]() bash: syntax error near unexpected token `(' |
$~
TR(1) User Commands TR(1) NAME tr - translate or delete characters SYNOPSIS tr [OPTION]... SET1 [SET2] DESCRIPTION Translate, squeeze, and/or delete characters from standard input, writ‐ ing to standard output. -c, -C, --complement first complement SET1 ... \\ backslash \a audible BEL \b backspace \f form feed \n new line \r return \t horizontal tab \v vertical tab CHAR1-CHAR2 all characters from CHAR1 to CHAR2 in ascending order |
$echo ((A+B))
![]() bash: syntax error near unexpected token `(' |
$echo (A+B)
![]() bash: syntax error near unexpected token `A+B' |
$echo A+B
A+B |
$echo $A+$B
1+2 |
$echo ($A+$B)
![]() bash: syntax error near unexpected token `$A+$B' |
$echo (($A+$B))
![]() bash: syntax error near unexpected token `(' |
$echo $((A+B))
3 |
$echo ((A+B))
![]() bash: syntax error near unexpected token `(' |
$echo ((A+$B))
![]() bash: syntax error near unexpected token `(' |
$cat /ect/passwd > newfile
![]() cat: /ect/passwd: Нет такого файла или каталога |
$cat /etc/passwd > newfile
|
$les newfile
![]() bash: les: команда не найдена |
$less newfile
|
$sort < /etc/passwd
avahi:x:106:110:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false backup:x:34:34:backup:/var/backups:/bin/sh bin:x:2:2:bin:/bin:/bin/sh daemon:x:1:1:daemon:/usr/sbin:/bin/sh Debian-exim:x:101:105::/var/spool/exim4:/bin/false festival:x:108:29::/home/festival:/bin/false games:x:5:60:games:/usr/games:/bin/sh gdm:x:107:113:Gnome Display Manager:/var/lib/gdm:/bin/false gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh haldaemon:x:109:114:Hardware abstraction layer,,,:/var/run/hal:/bin/false ... nobody:x:65534:65534:nobody:/nonexistent:/bin/sh proxy:x:13:13:proxy:/bin:/bin/sh root:x:0:0:root:/root:/bin/bash sshd:x:105:65534::/var/run/sshd:/usr/sbin/nologin statd:x:102:65534::/var/lib/nfs:/bin/false sync:x:4:65534:sync:/bin:/bin/sync sys:x:3:3:sys:/dev:/bin/sh user:x:1000:1000:user,,,:/home/user:/bin/bash uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh www-data:x:33:33:www-data:/var/www:/bin/sh |
$mv /etc/passwd /tmp
![]() mv: невозможно удалить `/etc/passwd': Отказано в доступе |
$mv /etc/passwd /tmp 2 > errlog
![]() mv: указанная цель `2' не является каталогом |
$mv /etc/passwd /tmp > errlog
![]() mv: невозможно удалить `/etc/passwd': Отказано в доступе |
$mv /etc/passwd /tmp 2> errlog
![]() |
$cat errlog
mv: невозможно удалить `/etc/passwd': Отказано в доступе |
$mv /etc/passwd /tmp 2> /dev/null
![]() |
$ls
?1?2?3 alloca.H core.c -file1 isdn_ttyfax.c passwd 1cdesktop another very long file name directory1 file2 ?kik?my Queen "Live at Webmley '86" aba **asterisk directory2 file3 killall Regexp.H abb A:\WINDOWS\SYSTEM32\ directory3 file with spaces at the name modules s*tol? abc bjan errlog group newfile term.h abd bjen fcntl.h -hello one space acpi bjon file1 *hrypun o'Reilly |
$pwd
/home/user/names |
$cd ~
|
$ls
backup file Light_Alloy_4.4.784_RC2_by_FAFNIR.exe man_smb_conf pamyatka.pdf text bigfile file1 longene-0.3.0-linux-2.6.34.tar.bz2 matrix.jpg press_any_key_to_continue.jpg touchlist bin freebsd.jpg lpi 1 names proj Desktop granata.jpg lpi 2 ogo.jpg source |
$cat >> unsorted
![]() ^C |
$ls
backup file Light_Alloy_4.4.784_RC2_by_FAFNIR.exe man_smb_conf pamyatka.pdf text bigfile file1 longene-0.3.0-linux-2.6.34.tar.bz2 matrix.jpg press_any_key_to_continue.jpg touchlist bin freebsd.jpg lpi 1 names proj unsorted Desktop granata.jpg lpi 2 ogo.jpg source |
$cat unsorted
|
$ls
backup file Light_Alloy_4.4.784_RC2_by_FAFNIR.exe man_smb_conf pamyatka.pdf text bigfile file1 longene-0.3.0-linux-2.6.34.tar.bz2 matrix.jpg press_any_key_to_continue.jpg touchlist bin freebsd.jpg lpi 1 names proj unsorted Desktop granata.jpg lpi 2 ogo.jpg source |
$ll
итого 17112 drwxr-xr-x 3 user user 4096 Мар 9 19:25 backup -rw-r--r-- 1 user user 7994 Мар 9 17:34 bigfile drwxr-xr-x 2 user user 4096 Мар 9 19:19 bin drwxr-xr-x 2 user user 4096 Мар 9 18:41 Desktop -rw-r--r-- 1 user user 0 Янв 1 2010 file -rw-r--r-- 1 user user 1308 Мар 10 13:24 file1 -rwxr-xr-x 1 user user 232966 Мар 9 17:34 freebsd.jpg -rwxr-xr-x 1 user user 52884 Мар 9 17:34 granata.jpg -rwxr-xr-x 1 user user 1751860 Мар 9 17:34 Light_Alloy_4.4.784_RC2_by_FAFNIR.exe ... -rwxr-xr-x 1 user user 755680 Мар 9 17:34 matrix.jpg drwxr-xr-x 3 user user 4096 Мар 10 14:48 names -rwxr-xr-x 1 user user 17622 Мар 9 17:34 ogo.jpg -rwxr-xr-x 1 user user 84663 Мар 9 17:34 pamyatka.pdf -rwxr-xr-x 1 user user 23048 Мар 9 17:34 press_any_key_to_continue.jpg drwxr-xr-x 3 user user 4096 Мар 10 14:41 proj drwxr-xr-x 2 user user 4096 Мар 9 19:01 source drwxr-xr-x 2 user user 4096 Мар 10 11:44 text -rw-r--r-- 1 user user 75 Мар 9 17:34 touchlist -rw-r--r-- 1 user user 0 Мар 10 14:50 unsorted |
$cat >> unsorted
![]() Windows XP WIndows NT Solaris Sun OS Linux FreeBSD ^C |
$ls
backup file Light_Alloy_4.4.784_RC2_by_FAFNIR.exe man_smb_conf pamyatka.pdf text bigfile file1 longene-0.3.0-linux-2.6.34.tar.bz2 matrix.jpg press_any_key_to_continue.jpg touchlist bin freebsd.jpg lpi 1 names proj unsorted Desktop granata.jpg lpi 2 ogo.jpg source |
$ls -al
итого 17400 drwxr-xr-x 30 user user 4096 Мар 10 14:50 . drwxr-xr-x 5 root root 4096 Мар 9 17:37 .. drwx------ 2 user user 4096 Мар 9 19:50 .AbiSuite drwxr-xr-x 3 user user 4096 Мар 9 19:25 backup -rw------- 1 user user 4195 Мар 10 13:51 .bash_history -rw-r--r-- 1 user user 220 Янв 1 2001 .bash_logout -rw-r--r-- 1 user root 21 Мар 10 12:53 .bash_profile -rw-r--r-- 1 user user 3151 Мар 10 12:53 .bashrc -rw-r--r-- 1 user user 7994 Мар 9 17:34 bigfile ... -rw-r--r-- 1 user user 714 Мар 10 13:51 .recently-used.xbel drwxr-xr-x 2 user user 4096 Мар 9 19:01 source drwx------ 2 user user 4096 Мар 9 20:01 .ssh drwxr-xr-x 2 user user 4096 Мар 10 11:44 text -rw-r--r-- 1 user user 75 Мар 9 17:34 touchlist -rw-r--r-- 1 user user 51 Мар 10 14:51 unsorted -rw------- 1 user user 6256 Мар 10 13:09 .viminfo -rw-r--r-- 1 user user 21 Мар 10 12:48 .vimrc -rw------- 1 user user 118 Мар 10 14:09 .Xauthority -rw-r--r-- 1 user user 140251 Мар 10 14:51 .xsession-errors |
$cat unsorted
Windows XP WIndows NT Solaris Sun OS Linux FreeBSD |
$sort < unsorted > sorted
|
$cat sorted
FreeBSD Linux Solaris Sun OS WIndows NT Windows XP |
$cat > file
Hello , lamer It test your proffesional level |
$cat file
Hello , lamer It test your proffesional level |
$cat >> file
OK, I'm ready |
$cat file
Hello , lamer It test your proffesional level OK, I'm ready |
$echo ((A+$B))
![]() bash: syntax error near unexpected token `(' |
$echo $A
1 |
$echo $B
2 |
$echo ((A+$B))
![]() bash: syntax error near unexpected token `(' |
$echo ((A+$B)
![]() bash: syntax error near unexpected token `(' |
$echo A+$B
A+2 |
$echo (A+$B)
![]() bash: syntax error near unexpected token `A+$B' |
$echo $((A+$B)
![]() > q |
$echo $((A+$B))
3 |
$cat bigfile | more
|
$cat bigfile | less
|
$mkdir /tmp/etccopy
|
|