常用指令

vim

複製貼上

參考連結: http://unclecode.blogspot.tw/2012/05/vim.html

暫存檔問題

#查看所有檔案,包含隱藏檔案
ls -al

#手動刪除
rm -r [filename]

參考連結: http://linux.vbird.org/linux_basic/0310vi.php

檔案與資料夾操作

刪除

#砍掉整個資料夾問都不問
rm -rf [dirname or file name]

#會問
rm -i [dirname or file name]

參考連結: https://ithelp.ithome.com.tw/articles/10159398

複製

狀態查詢

參考連結: https://blog.longwin.com.tw/2017/01/linux-cli-stat-find-file-time-2017/

查詢檔案或資料夾

參考連結: https://blog.camel2243.com/2016/09/21/linux-find-指令,搜尋檔案資料夾名稱與全文搜尋/ https://www.ubuntudoc.com/show-hidden-files-folders-ubuntu/?lang=zh-tw

查看使用記憶體

壓縮檔操作

參考連結: https://dotblogs.com.tw/may05005/2015/12/24/160605 http://idobest.pixnet.net/blog/post/22040782-[轉貼]-linux解壓-tar-命令 http://note.drx.tw/2008/04/command.html

使用金鑰進行ssh連線與傳輸檔案

中止程式

參考連結: https://blog.gtwang.org/linux/linux-kill-killall-xkill/

查看使用中的port

查詢功能

參考資料: https://blog.csdn.net/LY_Dengle/article/details/53997450

查看log

測試連線

參考連結: http://jashliao.pixnet.net/blog/post/163943597-每天一個linux指令--ping指令(用來測試與目標主

開關機紀錄

設定使用者密碼

參考連結: https://stackoverflow.com/questions/35016795/get-root-password-for-google-cloud-engine-vm

權限設定

三種身份:

  • u: 自己(user)

  • g: 和自己同一組的人(group)

  • o: 其它人 (other)

每種身份皆有四種可能的權限:

  • r : 讀取權 (read)

  • w : 寫入權 (write)

  • x : 執行權 (execute)

參考連結: https://blog.gtwang.org/linux/linux-chown-command-tutorial/ http://s2.naes.tn.edu.tw/~kv/file.htm

Failed to lock the file

當vm當機或被強迫關機,再度開啟時會出現的錯誤

參考資料: http://www.vixual.net/blog/archives/842

share folder

無法正常顯示資料夾時可重新安裝vmware tools

參考資料: https://snippetinfo.net/mobile/media/2004 http://jimmu-jimmu.blogspot.com/2012/12/vmwareguesthost.html

執行程式被kill

https://blog.csdn.net/ktigerhero3/article/details/80004315

關閉ssh連線時,保留欲執行的程式

https://blog.csdn.net/stonesharp/article/details/28904529

test:

https://dotblogs.com.tw/newmonkey48/2012/06/28/73115

http://linuxdiary.blogspot.com/2007/10/blog-post_30.html

ctrl+c vs ctrl+z

c是kill,z是掛起

z掛起後可以先做其他事,可用bg查看被掛起來的程式,再用fg把掛起的程式叫回來

https://blog.csdn.net/mylizh/article/details/38385739

排程設定

分鐘, 小時, 日期, 月份, 星期

參考連結: https://code.kpman.cc/2015/02/11/利用-crontab-來做-Linux-固定排程/

MTA錯誤

參考資料: https://blog.csdn.net/win_turn/article/details/53000899 https://blog.csdn.net/disappearedgod/article/details/43191693

Last updated

Was this helpful?