/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 |
|
#echo $PWD
/tmp |
#echo $OLD
/root |
#cd .
![]() |
#cd /tmp
|
#lz
![]() bash: lz: command not found |
#pwd
/tmp |
#cd /home/user
|
#pwd
/home/user |
#ls
hello |
#cd /tmp
|
#ls -l
итого 0 |
#ls -a
. .. .gdm_socket .ICE-unix .X0-lock .X11-unix |
#ls -a
. .. .gdm_socket .ICE-unix .X0-lock .X11-unix |
#ls -al
итого 5 drwxrwxrwt 4 root root 168 2010-01-11 11:34 . drwxr-xr-x 23 root root 544 2008-07-04 20:13 .. srw-rw-rw- 1 root root 0 2010-01-09 19:22 .gdm_socket drwxrwxrwt 2 root root 48 2010-01-09 19:22 .ICE-unix -r--r--r-- 1 root root 11 2010-01-09 19:22 .X0-lock drwxrwxrwt 2 root root 72 2010-01-09 19:22 .X11-unix |
#ls -al
итого 5 drwxrwxrwt 4 root root 168 2010-01-11 11:34 . drwxr-xr-x 23 root root 544 2008-07-04 20:13 .. srw-rw-rw- 1 root root 0 2010-01-09 19:22 .gdm_socket drwxrwxrwt 2 root root 48 2010-01-09 19:22 .ICE-unix -r--r--r-- 1 root root 11 2010-01-09 19:22 .X0-lock drwxrwxrwt 2 root root 72 2010-01-09 19:22 .X11-unix |
#ls -al /
итого 17 drwxr-xr-x 23 root root 544 2008-07-04 20:13 . drwxr-xr-x 23 root root 544 2008-07-04 20:13 .. drwxr-xr-x 2 root root 2480 2008-03-15 09:50 bin drwxr-xr-x 2 root root 48 2006-10-28 17:06 boot drwxr-xr-x 10 root root 2820 2010-01-09 19:22 dev drwxr-xr-x 56 root root 3384 2010-01-11 11:34 etc drwxr-xr-x 205 root root 4920 2008-03-14 11:04 home drwxr-xr-x 2 root root 48 2007-12-23 16:30 initrd drwxr-xr-x 12 root root 3696 2008-10-27 07:28 lib ... drwxr-xr-x 2 root root 48 2006-10-28 17:06 mnt drwxr-xr-x 2 root root 48 2007-12-23 16:30 opt dr-xr-xr-x 71 root root 0 2010-01-09 19:22 proc drwxr-xr-x 7 root root 400 2010-01-11 11:34 root drwxr-xr-x 2 root root 2736 2008-12-22 14:57 sbin drwxr-xr-x 2 root root 48 2007-12-23 16:30 srv drwxr-xr-x 12 root root 0 2010-01-09 19:22 sys drwxrwxrwt 4 root root 168 2010-01-11 11:34 tmp drwxr-xr-x 11 root root 264 2007-12-23 16:42 usr drwxr-xr-x 13 root root 312 2008-03-14 16:53 var |
#ls -l / | cat -n
1 итого 16 2 drwxr-xr-x 2 root root 2480 2008-03-15 09:50 bin 3 drwxr-xr-x 2 root root 48 2006-10-28 17:06 boot 4 drwxr-xr-x 10 root root 2820 2010-01-09 19:22 dev 5 drwxr-xr-x 56 root root 3384 2010-01-11 11:34 etc 6 drwxr-xr-x 205 root root 4920 2008-03-14 11:04 home 7 drwxr-xr-x 2 root root 48 2007-12-23 16:30 initrd 8 drwxr-xr-x 12 root root 3696 2008-10-27 07:28 lib 9 drwx------ 2 root root 48 2007-12-23 16:25 lost+found 10 drwxr-xr-x 2 root root 48 2007-12-23 16:30 media 11 drwxr-xr-x 2 root root 48 2006-10-28 17:06 mnt 12 drwxr-xr-x 2 root root 48 2007-12-23 16:30 opt 13 dr-xr-xr-x 72 root root 0 2010-01-09 19:22 proc 14 drwxr-xr-x 7 root root 400 2010-01-11 11:34 root 15 drwxr-xr-x 2 root root 2736 2008-12-22 14:57 sbin 16 drwxr-xr-x 2 root root 48 2007-12-23 16:30 srv 17 drwxr-xr-x 12 root root 0 2010-01-09 19:22 sys 18 drwxrwxrwt 4 root root 168 2010-01-11 11:34 tmp 19 drwxr-xr-x 11 root root 264 2007-12-23 16:42 usr 20 drwxr-xr-x 13 root root 312 2008-03-14 16:53 var |
#ls -a
1 итого 17 2 drwxr-xr-x 23 root root 544 2008-07-04 20:13 . 3 drwxr-xr-x 23 root root 544 2008-07-04 20:13 .. 4 drwxr-xr-x 2 root root 2480 2008-03-15 09:50 bin 5 drwxr-xr-x 2 root root 48 2006-10-28 17:06 boot 6 drwxr-xr-x 10 root root 2820 2010-01-09 19:22 dev 7 drwxr-xr-x 56 root root 3384 2010-01-11 11:34 etc 8 drwxr-xr-x 205 root root 4920 2008-03-14 11:04 home 9 drwxr-xr-x 2 root root 48 2007-12-23 16:30 initrd 10 drwxr-xr-x 12 root root 3696 2008-10-27 07:28 lib ... 13 drwxr-xr-x 2 root root 48 2006-10-28 17:06 mnt 14 drwxr-xr-x 2 root root 48 2007-12-23 16:30 opt 15 dr-xr-xr-x 72 root root 0 2010-01-09 19:22 proc 16 drwxr-xr-x 7 root root 400 2010-01-11 11:34 root 17 drwxr-xr-x 2 root root 2736 2008-12-22 14:57 sbin 18 drwxr-xr-x 2 root root 48 2007-12-23 16:30 srv 19 drwxr-xr-x 12 root root 0 2010-01-09 19:22 sys 20 drwxrwxrwt 4 root root 168 2010-01-11 11:34 tmp 21 drwxr-xr-x 11 root root 264 2007-12-23 16:42 usr 22 drwxr-xr-x 13 root root 312 2008-03-14 16:53 var |
#ls -al /
итого 17 drwxr-xr-x 23 root root 544 2008-07-04 20:13 . drwxr-xr-x 23 root root 544 2008-07-04 20:13 .. drwxr-xr-x 2 root root 2480 2008-03-15 09:50 bin drwxr-xr-x 2 root root 48 2006-10-28 17:06 boot drwxr-xr-x 10 root root 2820 2010-01-09 19:22 dev drwxr-xr-x 56 root root 3384 2010-01-11 11:34 etc drwxr-xr-x 205 root root 4920 2008-03-14 11:04 home drwxr-xr-x 2 root root 48 2007-12-23 16:30 initrd drwxr-xr-x 12 root root 3696 2008-10-27 07:28 lib ... drwxr-xr-x 2 root root 48 2006-10-28 17:06 mnt drwxr-xr-x 2 root root 48 2007-12-23 16:30 opt dr-xr-xr-x 71 root root 0 2010-01-09 19:22 proc drwxr-xr-x 7 root root 400 2010-01-11 11:34 root drwxr-xr-x 2 root root 2736 2008-12-22 14:57 sbin drwxr-xr-x 2 root root 48 2007-12-23 16:30 srv drwxr-xr-x 12 root root 0 2010-01-09 19:22 sys drwxrwxrwt 4 root root 168 2010-01-11 11:34 tmp drwxr-xr-x 11 root root 264 2007-12-23 16:42 usr drwxr-xr-x 13 root root 312 2008-03-14 16:53 var |
#ls -la
итого 5 drwxrwxrwt 4 root root 168 2010-01-11 11:34 . drwxr-xr-x 23 root root 544 2008-07-04 20:13 .. srw-rw-rw- 1 root root 0 2010-01-09 19:22 .gdm_socket drwxrwxrwt 2 root root 48 2010-01-09 19:22 .ICE-unix -r--r--r-- 1 root root 11 2010-01-09 19:22 .X0-lock drwxrwxrwt 2 root root 72 2010-01-09 19:22 .X11-unix |
#ls -l
итого 0 |
#LANG=C
|
#ls -al /
total 17 drwxr-xr-x 23 root root 544 Jul 4 2008 . drwxr-xr-x 23 root root 544 Jul 4 2008 .. drwxr-xr-x 2 root root 2480 Mar 15 2008 bin drwxr-xr-x 2 root root 48 Oct 28 2006 boot drwxr-xr-x 10 root root 2820 Jan 9 19:22 dev drwxr-xr-x 56 root root 3384 Jan 11 11:34 etc drwxr-xr-x 205 root root 4920 Mar 14 2008 home drwxr-xr-x 2 root root 48 Dec 23 2007 initrd drwxr-xr-x 12 root root 3696 Oct 27 2008 lib ... drwxr-xr-x 2 root root 48 Oct 28 2006 mnt drwxr-xr-x 2 root root 48 Dec 23 2007 opt dr-xr-xr-x 71 root root 0 Jan 9 19:22 proc drwxr-xr-x 7 root root 400 Jan 11 11:34 root drwxr-xr-x 2 root root 2736 Dec 22 2008 sbin drwxr-xr-x 2 root root 48 Dec 23 2007 srv drwxr-xr-x 12 root root 0 Jan 9 19:22 sys drwxrwxrwt 4 root root 168 Jan 11 11:34 tmp drwxr-xr-x 11 root root 264 Dec 23 2007 usr drwxr-xr-x 13 root root 312 Mar 14 2008 var |
#ls -la
![]() итого 5 drwxrwxrwt 4 root root 168 2010-01-11 11:34 . drwxr-xr-x 23 root root 544 2008-07-04 20:13 .. srw-rw-rw- 1 root root 0 2010-01-09 19:22 .gdm_socket drwxrwxrwt 2 root root 48 2010-01-09 19:22 .ICE-unix -r--r--r-- 1 root root 11 2010-01-09 19:22 .X0-lock drwxrwxrwt 2 root root 72 2010-01-09 19:22 .X11-unix |
#ls -lah
[root@debian1:tmp]# ls -la total 5 drwxrwxrwt 4 root root 168 Jan 11 11:34 . drwxr-xr-x 23 root root 544 Jul 4 2008 .. drwxrwxrwt 2 root root 48 Jan 9 19:22 .ICE-unix -r--r--r-- 1 root root 11 Jan 9 19:22 .X0-lock drwxrwxrwt 2 root root 72 Jan 9 19:22 .X11-unix srw-rw-rw- 1 root root 0 Jan 9 19:22 .gdm_socket total 4.5K drwxrwxrwt 4 root root 168 Jan 11 11:34 . drwxr-xr-x 23 root root 544 Jul 4 2008 .. drwxrwxrwt 2 root root 48 Jan 9 19:22 .ICE-unix -r--r--r-- 1 root root 11 Jan 9 19:22 .X0-lock drwxrwxrwt 2 root root 72 Jan 9 19:22 .X11-unix srw-rw-rw- 1 root root 0 Jan 9 19:22 .gdm_socket |
#ls -l
[root@debian1:tmp]# touch file total 0 -rw-r--r-- 1 root root 0 Jan 11 11:52 file |
#ls -l
[root@debian1:tmp]# ls -la total 5 drwxrwxrwt 4 root root 192 Jan 11 11:52 . drwxr-xr-x 23 root root 544 Jul 4 2008 .. drwxrwxrwt 2 root root 48 Jan 9 19:22 .ICE-unix -r--r--r-- 1 root root 11 Jan 9 19:22 .X0-lock drwxrwxrwt 2 root root 72 Jan 9 19:22 .X11-unix srw-rw-rw- 1 root root 0 Jan 9 19:22 .gdm_socket -rw-r--r-- 1 root root 0 Jan 11 11:52 file total 0 -rw-r--r-- 1 root root 0 Jan 11 11:52 file |
#ls -la
итого 5 drwxrwxrwt 4 root root 192 2010-01-11 11:52 . drwxr-xr-x 23 root root 544 2008-07-04 20:13 .. -rw-r--r-- 1 root root 0 2010-01-11 11:52 file srw-rw-rw- 1 root root 0 2010-01-09 19:22 .gdm_socket drwxrwxrwt 2 root root 48 2010-01-09 19:22 .ICE-unix -r--r--r-- 1 root root 11 2010-01-09 19:22 .X0-lock drwxrwxrwt 2 root root 72 2010-01-09 19:22 .X11-unix |
#ln -s file sym_link_to_file
![]() ln: создание символьной ссылки с `sym_link_to_file' на `file': File exists |
#ls -l
[root@debian1:tmp]# ln -s file sym_link_to_file total 0 -rw-r--r-- 1 root root 0 Jan 11 11:52 file lrwxrwxrwx 1 root root 4 Jan 11 11:53 sym_link_to_file -> file |
#ls -la
итого 5 drwxrwxrwt 4 root root 224 2010-01-11 11:53 . drwxr-xr-x 23 root root 544 2008-07-04 20:13 .. -rw-r--r-- 1 root root 0 2010-01-11 11:52 file srw-rw-rw- 1 root root 0 2010-01-09 19:22 .gdm_socket drwxrwxrwt 2 root root 48 2010-01-09 19:22 .ICE-unix lrwxrwxrwx 1 root root 4 2010-01-11 11:53 sym_link_to_file -> file -r--r--r-- 1 root root 11 2010-01-09 19:22 .X0-lock drwxrwxrwt 2 root root 72 2010-01-09 19:22 .X11-unix |
#vim sym_link_to_file
--- /tmp/l3-saved-2188.22217.2382 2010-01-11 11:54:11.000000000 +0200 +++ sym_link_to_file 2010-01-11 11:54:30.000000000 +0200 @@ -0,0 +1 @@ +added in sym_link_to_file |
#ln file hard_link_to_file
![]() ln: создание жесткой ссылки с `hard_link_to_file' на `file': File exists |
#cat file
[root@debian1:tmp]# cat sym_link_to_file added in sym_link_to_file added in sym_link_to_file |
#vim sym_link_to_file
--- /tmp/l3-saved-2188.32765.13680 2010-01-11 11:54:57.000000000 +0200 +++ sym_link_to_file 2010-01-11 11:55:11.000000000 +0200 @@ -1 +1,102 @@ added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file +added in sym_link_to_file |
#vim sym_link_to_file
![]() |
#ls -li
total 4 52448 -rw-r--r-- 1 root root 2652 Jan 11 11:55 file 52474 lrwxrwxrwx 1 root root 4 Jan 11 11:53 sym_link_to_file -> file |
#ls -l
[root@debian1:tmp]# ln file hard_link_to_file total 8 -rw-r--r-- 2 root root 2652 Jan 11 11:55 file -rw-r--r-- 2 root root 2652 Jan 11 11:55 hard_link_to_file lrwxrwxrwx 1 root root 4 Jan 11 11:53 sym_link_to_file -> file |
#ls -l
итого 8 -rw-r--r-- 2 root root 2652 2010-01-11 11:55 file -rw-r--r-- 2 root root 2652 2010-01-11 11:55 hard_link_to_file lrwxrwxrwx 1 root root 4 2010-01-11 11:53 sym_link_to_file -> file |
#ls -li
итого 8 52448 -rw-r--r-- 2 root root 2652 2010-01-11 11:55 file 52448 -rw-r--r-- 2 root root 2652 2010-01-11 11:55 hard_link_to_file 52474 lrwxrwxrwx 1 root root 4 2010-01-11 11:53 sym_link_to_file -> file |
#ls -li
total 8 52448 -rw-r--r-- 2 root root 2652 Jan 11 11:55 file 52448 -rw-r--r-- 2 root root 2652 Jan 11 11:55 hard_link_to_file 52474 lrwxrwxrwx 1 root root 4 Jan 11 11:53 sym_link_to_file -> file |
#ls -l /tmp/fifo
[root@debian1:tmp]# mkfifo /tmp/fifo prw-r--r-- 1 root root 0 Jan 11 11:59 /tmp/fifo |
#rm -v fil]e
![]() rm: cannot remove `fil]e': No such file or directory |
#rm -v sym_link_to_file
removed `sym_link_to_file' |
#rm -vi hard_link_to_file
rm: remove regular file `hard_link_to_file'? n |
#rm -vi hard_link_to_file
![]() |
#ls
fifo hard_link_to_file |
#mkdir 1
[root@debian1:tmp]# rm -rf /* |
#ls
1 fifo hard_link_to_file |
#ls -l 1
[root@debian1:tmp]# ls -l total 4 drwxr-xr-x 2 root root 48 Jan 11 12:03 1 prw-r--r-- 1 root root 0 Jan 11 11:59 fifo -rw-r--r-- 1 root root 2652 Jan 11 11:55 hard_link_to_file total 0 |
#ls
1 2 fifo hard_link_to_file |
#mkdir -pv 1/2/3/4/5
[root@debian1:tmp]# mkdir 1/2/3/4/5 mkdir: cannot create directory `1/2/3/4/5': No such file or directory mkdir: created directory `1/2' mkdir: created directory `1/2/3' mkdir: created directory `1/2/3/4' mkdir: created directory `1/2/3/4/5' |
#rmdir 1
![]() [root@debian1:tmp]# tree 1 1 `-- 2 `-- 3 `-- 4 `-- 5 4 directories, 0 files rmdir: 1: Directory not empty |
#rmdir 1/2/3
[root@debian1:tmp]# rmdir 1/2/3/4 |
#rmdir 1/2
|
#rm -rf 1/
|
#tree 2009
[root@debian1:tmp]# mkdir -vp 200{7,8,9}/{0{1,2,3,4,5,6,7,8,9},1{0,1,2}} mkdir: created directory `2007' mkdir: created directory `2007/01' mkdir: created directory `2007/02' mkdir: created directory `2007/03' mkdir: created directory `2007/04' mkdir: created directory `2007/05' mkdir: created directory `2007/06' mkdir: created directory `2007/07' mkdir: created directory `2007/08' ... |-- 04 |-- 05 |-- 06 |-- 07 |-- 08 |-- 09 |-- 10 |-- 11 `-- 12 12 directories, 0 files |
#ls
[root@debian1:tmp]# mkdir -vp 200{7,8,9}/{0{1,2,3,4,5,6,7,8,9},1{0,1,2}} 2 2007 2008 2009 fifo hard_link_to_file |
#ls -l
[root@debian1:tmp]# cp hard_link_to_file hard_link_to_file_copy total 8 drwxr-xr-x 2 root root 48 Jan 11 12:03 2 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 2652 Jan 11 11:55 hard_link_to_file -rw-r--r-- 1 root root 2652 Jan 11 12:07 hard_link_to_file_copy |
#ls
[root@debian1:tmp]# cp hard_link_to_file{,_backup} 2 2008 fifo hard_link_to_file_backup 2007 2009 hard_link_to_file hard_link_to_file_copy |
#cd /
|
#ls
bin dev home lib media opt root srv tmp var boot etc initrd lost+found mnt proc sbin sys usr |
#cd /:
![]() bash: cd: /:: No such file or directory |
#cd ^
![]() bash: cd: ^: No such file or directory |
|