[toc]linux
快捷鍵: Ctrl + l :清屏 Ctrl + d :退出終端(至關於執行了:exit 或logout) Ctrl + c : 強制中斷 Ctrl + u : 在命令輸入行,刪除光標前的字符串 Ctrl + e : 光標移到末尾 Ctrl + a : 光標移到開始
先介紹在Linux中經常使用的幾個快捷鍵: Ctrl + l :清屏 Ctrl + d :退出終端(至關於執行了:exit 或logout) Ctrl + c :強制中斷 Ctrl + u :在命令輸入行,刪除光標前的字符串 Ctrl + e :光標移到末尾 Ctrl + a :光標移到開始
用來定位指令的二進制程序、源代碼文件和man手冊頁等相關文件的路徑。windows
[root@xavi-001 ~]# yum install -y mlocate 已加載插件:fastestmirror, langpacks
[root@xavi-001 ~]# find /etc/ -name "sshd_config" /etc/ssh/sshd_config [root@xavi-001 ~]# find /etc/ -name "sshd*" /etc/ssh/sshd_config /etc/systemd/system/multi-user.target.wants/sshd.service /etc/sysconfig/sshd /etc/pam.d/sshd
[root@xavi-001 ~]# find /etc/ -type f -name "sshd*" /etc/ssh/sshd_config /etc/sysconfig/sshd /etc/pam.d/sshd
[root@xavi-001 ~]# find /etc/ -type l
[root@xavi-001 ~]# find /dev/ -type b /dev/sr0 /dev/sda3 /dev/sda2 /dev/sda1 /dev/sda
舉例:bash
[root@xavi-001 ~]# find /etc/ -type f -mtime -1 /etc/resolv.conf /etc/tuned/active_profile
[root@xavi-001 ~]# find /etc/ -type f -ctime -1 -name "*.conf" /etc/resolv.conf
[root@xaviyunserver ~]# find /tmp/ -type f -o -mtime -1 -o -name "aliases" /tmp/ /tmp/bin /tmp/11.txt /tmp/123 /tmp/123/1.txt
[root@xavi-001 ~]# find /root/ -size +5k /root/.bash_history [root@xavi-001 ~]# find /root/ -size -5k /root/ /root/.bash_logout
[root@xavi-001 ~]# find /root/ -type f -size -10k -exec ls -lh {} \; -rw-r--r--. 1 root root 18 Dec 29 2013 /root/.bash_logout -rw-r--r--. 1 root root 176 Dec 29 2013 /root/.bash_profile -rw-r--r--. 1 root root 176 Dec 29 2013 /root/.bashrc -rw-r--r--. 1 root root 100 Dec 29 2013 /root/.cshrc -rw-r--r--. 1 root root 129 Dec 29 2013 /root/.tcshrc -rw-r--r--. 1 root root 1.7K Aug 9 00:17 /root/initial-setup-ks.cfg
.sh 腳本或批處理文件 .bz2 bzip2的壓縮文件 .gz gzip的壓縮文件 .tar tar打包文件 .tbz tar打包並用bzip壓縮文件 .tgz tar打包並用gzip壓縮的文件 .conf 配置文件 .lock LOCK文件(用來判斷一個文件或設備是否被使用) .rpm REDHATPackage.Manager文件(套件包或軟件包) .c C源程序代碼文件 .cpp C++源程序代碼文件 .h C或C++程序的頭文件 .o 程序目標文件 .pl perl腳本文件 .so 類庫文件
[root@xavi-001 ~]# LANG=zh_CN.utf-8 [root@xavi-001 ~]# stat 2.txt stat: 沒法獲取"2.txt" 的文件狀態(stat): 沒有那個文件或目錄
[root@xavi-001 ~]# yum install -y lrzsz