2017年6月20日 星期二

106/05/05 第九週 Linux桌面系統

第七章~第九章

mate@mydebian8:~/Student$ echo $USER
mate
mate@mydebian8:~/Student$ cd ~
mate@mydebian8:~$ printenv | less
mate@mydebian8:~$ echo $(ls)
0942.txt 404040389.txt 40404089.txt jiaying87 lazy_dog.txt ls-error.txt ls-output.txt ls.txt movie.mpeg Student 下載 公共 圖片 影片 文件 桌面 模板 音樂
mate@mydebian8:~$ ls -l $(which cp)
-rwxr-xr-x 1 root root 150824  3月 14  2015 /bin/cp
mate@mydebian8:~$ file $(ls -d /usr/bin/* | grep zip)
/usr/bin/funzip:     ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=5b0506c8be78c25ef759c2faa6b3335eb1b01c91, stripped
/usr/bin/gpg-zip:    POSIX shell script, ASCII text executable
/usr/bin/preunzip:   POSIX shell script, ASCII text executable
/usr/bin/prezip:     POSIX shell script, ASCII text executable
/usr/bin/prezip-bin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=9f858e8b59fe10b434e638a95be7d2a85f2fbc1a, stripped
/usr/bin/unzip:      ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=ad98f8ca0a6425fc7909aad6f0b99013630346be, stripped
/usr/bin/unzipsfx:   ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=588b1dbafe2dc608823daa966e6d4836b7abe5da, stripped
/usr/bin/zipdetails: Perl script, ASCII text executable
/usr/bin/zipgrep:    POSIX shell script, ASCII text executable
/usr/bin/zipinfo:    ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=ad98f8ca0a6425fc7909aad6f0b99013630346be, stripped
mate@mydebian8:~$ ls -l `which cp`
-rwxr-xr-x 1 root root 150824  3月 14  2015 /bin/cp
mate@mydebian8:~$ ls -l `which cd`
總計 1816
-rw-r--r-- 1 root root      30 10月 14  2016 0942.txt
-rw-r--r-- 1 mate mate     109 10月 28  2016 404040389.txt
-rw-r--r-- 1 mate mate     192 10月 28  2016 40404089.txt
-rw-r--r-- 1 mate mate      12 11月 10 21:19 jiaying87
-rw-r--r-- 1 mate mate       7  3月 24 09:34 lazy_dog.txt
-rw-r--r-- 1 mate mate      55  3月 24 08:55 ls-error.txt
-rw-r--r-- 1 mate mate      58  3月 24 09:24 ls-output.txt
-rw-r--r-- 1 mate mate   21804  3月 24 09:56 ls.txt
-rw-r--r-- 1 mate mate       0  3月 24 09:29 movie.mpeg
drwxr-xr-x 1 mate mate 1769472  5月  5 08:38 Student
drwxr-xr-x 2 mate mate    4096  3月 24 08:13 下載
drwxr-xr-x 2 mate mate    4096  9月 30  2016 公共
drwxr-xr-x 2 mate mate    4096  4月 20 17:36 圖片
drwxr-xr-x 2 mate mate    4096  9月 30  2016 影片
drwxr-xr-x 2 mate mate    4096  3月 10 12:25 文件
drwxr-xr-x 2 mate mate    4096  4月 19 12:16 桌面
drwxr-xr-x 2 mate mate    4096  9月 30  2016 模板
drwxr-xr-x 2 mate mate    4096  9月 30  2016 音樂
mate@mydebian8:~$ ls -l `which mkdir`
-rwxr-xr-x 1 root root 80744  3月 14  2015 /bin/mkdir
mate@mydebian8:~$ echo this is a           test
this is a test
mate@mydebian8:~$ echo Yhe total is $100.00
Yhe total is 00.00
mate@mydebian8:~$ echo 'this is a      test'
this is a      test
mate@mydebian8:~$ ls -l two words.txt
ls: 無法存取 two: 沒有此一檔案或目錄
ls: 無法存取 words.txt: 沒有此一檔案或目錄
mate@mydebian8:~$ ls -l two lazydog.txt
ls: 無法存取 two: 沒有此一檔案或目錄
ls: 無法存取 lazydog.txt: 沒有此一檔案或目錄
mate@mydebian8:~$ ls -l two 404040389.txt
ls: 無法存取 two: 沒有此一檔案或目錄
-rw-r--r-- 1 mate mate 109 10月 28  2016 404040389.txt
mate@mydebian8:~$ ls -l two words.txt
ls: 無法存取 two: 沒有此一檔案或目錄
ls: 無法存取 words.txt: 沒有此一檔案或目錄
mate@mydebian8:~$ ls -l "two words.txt"
ls: 無法存取 two words.txt: 沒有此一檔案或目錄
mate@mydebian8:~$ echo "$USER $((2+2}} $(cal)"
> q
> ^C
mate@mydebian8:~$ echo "$USER $((2+2)) $(cal)"
mate 4       五月 2017        
日 一 二 三 四 五 六 
    1  2  3  4  5  6 
 7  8  9 10 11 12 13 
14 15 16 17 18 19 20 
21 22 23 24 25 26 27 
28 29 30 31          
                     
mate@mydebian8:~$ echo "$USER $((2+3)) $(cal)"
mate 5       五月 2017        
日 一 二 三 四 五 六 
    1  2  3  4  5  6 
 7  8  9 10 11 12 13 
14 15 16 17 18 19 20 
21 22 23 24 25 26 27 
28 29 30 31          
                     
mate@mydebian8:~$ echo $(cal)
五月 2017 日 一 二 三 四 五 六 1 2 3 4  5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
mate@mydebian8:~$ echo "$(cal)"
      五月 2017        
日 一 二 三 四 五 六 
    1  2  3  4  5  6 
 7  8  9 10 11 12 13 
14 15 16 17 18 19 20 
21 22 23 24 25 26 27 
28 29 30 31          
                     
mate@mydebian8:~$ echo "text ~/*.txt {a,b} $(echo foo) $((2+2)) $USER"
text ~/*.txt {a,b} foo 4 mate

mate@mydebian8:~$ mkdir Students
mate@mydebian8:~$ cd Students
mate@mydebian8:~/Students$ mkdir {2015..2017}-{09..12}
mate@mydebian8:~/Students$ ls
2015-09  2015-11  2016-09  2016-11  2017-09  2017-11
2015-10  2015-12  2016-10  2016-12  2017-10  2017-12
mate@mydebian8:~/Students$ echo *
2015-09 2015-10 2015-11 2015-12 2016-09 2016-10 2016-11 2016-12 2017-09 2017-10 2017-11 2017-12
mate@mydebian8:~/Students$ cd ~
mate@mydebian8:~$ echo *
0942.txt 404040389.txt 40404089.txt jiaying87 lazy_dog.txt ls-error.txt ls-output.txt ls.txt movie.mpeg Student Students 下載 公共 圖片 影片 文件 桌面 模板 音樂
mate@mydebian8:~$ echo ppap
ppap
mate@mydebian8:~$ echo $USER
mate
mate@mydebian8:~$ echo '$USER'
$USER
mate@mydebian8:~$ echo "$USER"
mate
mate@mydebian8:~$ ls
0942.txt       jiaying87     ls-output.txt  Student   公共  文件  音樂
404040389.txt  lazy_dog.txt  ls.txt         Students  圖片  桌面
40404089.txt   ls-error.txt  movie.mpeg     下載      影片  模板
mate@mydebian8:~$ ls l
lazy_dog.txt   ls-error.txt   ls-output.txt  ls.txt        
mate@mydebian8:~$

沒有留言:

張貼留言