新手必须掌握的LINUX命令(二)

──(zhong㉿kali)-[~/桌面]
└─$ mkdir /home/zhong/桌面/ni                 
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面]
└─$ mkdir -p  /home/zhong/桌面/qiantao/ni/wo/ta 
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面]
└─$ 

┌──(zhong㉿kali)-[~/桌面]
└─$ ls -al
总用量 125196
-rw-r--r--  1 zhong zhong      6515  3月 12 18:07 huangdiyinfujing.txt
drwxr-xr-x  2 zhong zhong      4096  3月 12 18:22 ni
-rw-r--r--  1 zhong zhong        25  3月 12 10:22 nihao.txt
drwxr-xr-x  3 zhong zhong      4096  3月 12 18:24 qiantao
┌──(zhong㉿kali)-[~/桌面]
└─$ cd /home/zhong/桌面/qiantao
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ touch yuanjian.txt                              
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ cp yuanjian.txt fuzhijian.txt                       
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ ls    
fuzhijian.txt  ni  yuanjian.txt
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ ls -al
总用量 12
drwxr-xr-x 3 zhong zhong 4096  3月 12 18:28 .
drwxr-xr-x 5 zhong zhong 4096  3月 12 18:24 ..
-rw-r--r-- 1 zhong zhong    0  3月 12 18:28 fuzhijian.txt
drwxr-xr-x 3 zhong zhong 4096  3月 12 18:24 ni
-rw-r--r-- 1 zhong zhong    0  3月 12 18:28 yuanjian.txt
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ mv fuzhijian.txt fuyinjian.txt             
                                                                                                                                                                                                                                                                                                              
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ ls    
fuyinjian.txt  ni  yuanjian.txt
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ ls -al
总用量 12
drwxr-xr-x 3 zhong zhong 4096  3月 12 18:31 .
drwxr-xr-x 5 zhong zhong 4096  3月 12 18:24 ..
-rw-r--r-- 1 zhong zhong    0  3月 12 18:28 fuyinjian.txt
drwxr-xr-x 3 zhong zhong 4096  3月 12 18:24 ni
-rw-r--r-- 1 zhong zhong    0  3月 12 18:28 yuanjian.txt
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ rm fuyinjian.txt
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ rm -r ni        
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ ls    
yuanjian.txt
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ ls -al
总用量 8
drwxr-xr-x 2 zhong zhong 4096  3月 12 18:34 .
drwxr-xr-x 5 zhong zhong 4096  3月 12 18:24 ..
-rw-r--r-- 1 zhong zhong    0  3月 12 18:28 yuanjian.txt
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ dd if=/dev/cdrom of=RHEL-server-7.0-x86_64-LinuxProbe.Com.iso
7311360+0 records in
7311360+0 records out
3743416320 bytes (3.7 GB) copied, 370.758 s, 10.1 MB/s
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ file yuanjian.txt              
yuanjian.txt: empty
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ cp /home/zhong/桌面/huangdiyinfujing.txt /home/zhong/桌面/qiantao 
                                                                                                                                                                                                                                                                                                                   
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ ls    
huangdiyinfujing.txt  yuanjian.txt
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ file huangdiyinfujing.txt        
huangdiyinfujing.txt: Unicode text, UTF-8 text
┌──(zhong㉿kali)-[~/桌面/qiantao]
└─$ cd ~
                                                                                                                                                            
┌──(zhong㉿kali)-[~]
└─$ cd /home/zhong/桌面
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面]
└─$ ls -al
总用量 125196
drwxr-xr-x  5 zhong zhong      4096  3月 12 19:25 .
drwxr-xr-x 26 zhong zhong      4096  3月 12 19:19 ..
-rwxrwxrwx  1 zhong zhong 113179925  3月  9 17:50 Clash for Windows-0.19.11-x64.tar.gz
-rw-r--r--  1 zhong zhong        50  3月 11 18:13 .directory
-rwxrwxrwx  1 zhong zhong  14955708  3月  8 15:36 FileZilla3.tar.bz2
-rw-r--r--  1 zhong zhong      6515  3月 12 18:07 huangdiyinfujing.txt
drwxr-xr-x  2 zhong zhong      4096  3月 12 18:22 ni
-rw-r--r--  1 zhong zhong        25  3月 12 10:22 nihao.txt
drwxr-xr-x  2 zhong zhong      4096  3月 12 18:40 qiantao
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面]
└─$ sudo tar -zxvf /home/zhong/桌面/Clash for Windows-0.19.11-x64.tar.gz -C /opt/                                
Clash for Windows-0.19.11-x64-linux/
Clash for Windows-0.19.11-x64-linux/LICENSE.electron.txt
Clash for Windows-0.19.11-x64-linux/LICENSES.chromium.html
Clash for Windows-0.19.11-x64-linux/cfw
Clash for Windows-0.19.11-x64-linux/chrome-sandbox
Clash for Windows-0.19.11-x64-linux/chrome_100_percent.pak
Clash for Windows-0.19.11-x64-linux/chrome_200_percent.pak
Clash for Windows-0.19.11-x64-linux/chrome_crashpad_handler
Clash for Windows-0.19.11-x64-linux/icudtl.dat
Clash for Windows-0.19.11-x64-linux/libEGL.so
Clash for Windows-0.19.11-x64-linux/libGLESv2.so
Clash for Windows-0.19.11-x64-linux/libffmpeg.so
Clash for Windows-0.19.11-x64-linux/libvk_swiftshader.so
Clash for Windows-0.19.11-x64-linux/libvulkan.so.1
┌──(zhong㉿kali)-[~/桌面]
└─$ cd /opt            
                                                                                                                                                            
┌──(zhong㉿kali)-[/opt]
└─$ sudo mv 'Clash for Windows-0.19.11-x64-linux' Clash
┌──(zhong㉿kali)-[/opt]
└─$ sudo tar -zcvf /home/zhong/桌面/Clash.tar.gz /opt/Clash
tar: 从成员名中删除开头的“/”
/opt/Clash/
/opt/Clash/resources/
/opt/Clash/resources/static/
/opt/Clash/resources/static/files/
/opt/Clash/resources/static/files/default/
/opt/Clash/resources/static/files/default/config.yaml
/opt/Clash/resources/static/files/default/Country.mmdb
/opt/Clash/resources/static/files/linux/
/opt/Clash/resources/static/files/linux/common/
/opt/Clash/resources/static/files/linux/common/service-installer/
┌──(zhong㉿kali)-[/opt]
└─$ cd /home/zhong/桌面
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面]
└─$ sudo tar -jxvf /home/zhong/桌面/FileZilla3.tar.bz2 -C /opt/
FileZilla3/
FileZilla3/share/
FileZilla3/share/filezilla/
FileZilla3/share/filezilla/docs/
FileZilla3/share/filezilla/docs/fzdefaults.xml.example
FileZilla3/share/filezilla/resources/
FileZilla3/share/filezilla/resources/blukis/
FileZilla3/share/filezilla/resources/blukis/16x16/
FileZilla3/share/filezilla/resources/blukis/16x16/ascii.png
┌──(zhong㉿kali)-[~/桌面]
└─$ sudo tar -jcvf FileZilla.tar.bz2 /opt/FileZilla3
tar: 从成员名中删除开头的“/”
/opt/FileZilla3/
/opt/FileZilla3/share/
/opt/FileZilla3/share/applications/
/opt/FileZilla3/share/applications/filezilla.desktop
/opt/FileZilla3/share/locale/
/opt/FileZilla3/share/locale/de/
/opt/FileZilla3/share/locale/de/LC_MESSAGES/
/opt/FileZilla3/share/locale/de/LC_MESSAGES/filezilla.mo
/opt/FileZilla3/share/locale/de/LC_MESSAGES/libfilezilla.mo

┌──(zhong㉿kali)-[~/桌面]
└─$ ls -al
总用量 254864
drwxr-xr-x  4 zhong zhong      4096  3月 12 19:49  .
drwxr-xr-x 26 zhong zhong      4096  3月 12 19:19  ..
-rwxrwxrwx  1 zhong zhong 113179925  3月  9 17:50 'Clash for Windows-0.19.11-x64-linux.tar.gz'
-rw-r--r--  1 root  root  117816817  3月 12 19:38  Clash.tar.gz
-rwxrwxrwx  1 zhong zhong  14955708  3月  8 15:36  FileZilla3.tar.bz2
-rw-r--r--  1 root  root   14973505  3月 12 19:49  FileZilla.tar.bz2
-rw-r--r--  1 zhong zhong      6515  3月 12 18:07  huangdiyinfujing.txt
drwxr-xr-x  2 zhong zhong      4096  3月 12 18:22  ni
-rw-r--r--  1 zhong zhong        25  3月 12 10:22  nihao.txt
drwxr-xr-x  2 zhong zhong      4096  3月 12 18:40  qiantao
┌──(zhong㉿kali)-[~/桌面]
└─$ cd /opt            
                                                                                                                                                            
┌──(zhong㉿kali)-[/opt]
└─$ cp -r /opt/Clash /home/zhong/桌面/  

┌──(zhong㉿kali)-[/opt]
└─$ cd -   
~/桌面
                                                                                                                                                            
┌──(zhong㉿kali)-[~/桌面]
└─$ ls -al
总用量 254868
drwxr-xr-x  5 zhong zhong      4096  3月 12 19:54  .
drwxr-xr-x 26 zhong zhong      4096  3月 12 19:19  ..
drwxr-xr-x  5 zhong zhong      4096  3月 12 19:54  Clash
-rwxrwxrwx  1 zhong zhong 113179925  3月  9 17:50 'Clash for Windows-0.19.11-x64-linux.tar.gz'
-rw-r--r--  1 root  root  117816817  3月 12 19:38  Clash.tar.gz
-rwxrwxrwx  1 zhong zhong  14955708  3月  8 15:36  FileZilla3.tar.bz2
-rw-r--r--  1 root  root   14973505  3月 12 19:49  FileZilla.tar.bz2
-rw-r--r--  1 zhong zhong      6515  3月 12 18:07  huangdiyinfujing.txt
drwxr-xr-x  2 zhong zhong      4096  3月 12 18:22  ni
-rw-r--r--  1 zhong zhong        25  3月 12 10:22  nihao.txt
drwxr-xr-x  2 zhong zhong      4096  3月 12 18:40  qiantao

作者: 张津东

群而不党,和而不同,自由理性皆容纳。

发表回复