馬上要畢業了,要去面試這些這裏我使用XShell來操作
常用快捷鍵
常用快捷鍵 |
功能 |
ctrl+c |
停止進程 |
ctrl+l |
清屏 |
ctrl+q |
退出 |
Tab |
補全 |
文件目錄指令
[root@localhost ~]# pwd
/root
- 基本用法: ls[選項] [目錄或者文件]
- 選項說明
選項 |
功能 |
-a |
全部的文件,連同隱藏文件( 開頭爲 . 的文件) 一起列出來(常用) |
-l |
長數據串列出,包含文件的屬性與權限等等數據;(常用) |
[root@localhost ~]# ls -a
. .. anaconda-ks.cfg .bash_history .bash_logout .bash_profile .bashrc .cache .config .cshrc .dbus initial-setup-ks.cfg jdk7u-dev jobs .mysql_history .pki .tcshrc .viminfo
[root@localhost ~]# ls -l
總用量 8
-rw-------. 1 root root 1757 2月 27 22:10 anaconda-ks.cfg
-rw-r--r--. 1 root root 1785 2月 27 14:20 initial-setup-ks.cfg
drwxr-xr-x. 6 root root 232 4月 23 14:51 jdk7u-dev
-rw-r--r--. 1 root root 0 4月 17 13:52 jobs
- 基本語法
cd [參數]
- 參數說明
參數 |
功能 |
cd絕對路徑 |
切換路徑 |
cd相對路徑 |
切換路徑 |
cd |
回到根目錄 |
cd - |
回到上一個目錄 |
cd … |
回到當前目錄的上一級 |
- mkdir 創建一個新的目錄
- rmdir 刪除一個空的目錄
- touch 創建空文件
- cp複製文件或目錄
- rm移除文件
- mv 移動文件與目錄或重命名
- cat查看文件內容