數(shù)倉(cāng)培訓(xùn)第一天
一、系統(tǒng)安裝部署
具體流程參考:
Centos7.2安裝部署(圖文教程)ici
CentOS6.5配置靜態(tài)IP和可訪問(wèn)外網(wǎng)ici
CentOS6.5修改主機(jī)名ici
二、Linux部分認(rèn)知和命令
1. [root@hadoop001 ~]#
root默認(rèn)管理員煌寇,擁有最大權(quán)限
hadoop001是機(jī)器名稱(chēng)淹朋,可以自行修改
~表示當(dāng)前用戶家目錄 root用戶家目錄/root , hadoop001用戶家目錄/home/hadoop001
2. pwd查看當(dāng)前光標(biāo)所在目錄 路徑
[root@ hadoop001 ~]# pwd
root
3. ls 查看
[root@ hadoop001 ~]# ls
ls 顯示文件夾 文件名稱(chēng)
ls -l 顯示額外信息 權(quán)限 用戶用戶組 更新時(shí)間 大小
ls -l -a 顯示隱藏文件夾和文件 = ls -al
[root@ hadoop001 ~]# ls -l -a
total 4
dr-xr-x---. 6 root root 4096 Apr 15 21:51 .
dr-xr-xr-x. 17 root root 4096 Aug 8 2018 ..
-rw-------. 1 root root 3814 Apr 15 21:49 .bash_history
-rw-r--r--. 1 root root 18 Dec 29 2013 .bash_logout
隱藏文件夾 文件是以.開(kāi)頭
ls -l -h #僅僅查看文件的大小
ls -l -r -t #按時(shí)間排序 (解決如何快速找到最新更新文件的問(wèn)題)
ll -a #ls -l ==》ll #等價(jià)
ll -rt
ll -h
4. mkdir 創(chuàng)建文件夾
[root@ hadoop001 ~]# mkdir ruozedata
[root@ hadoop001 ~]# ls
ruozedata
mkdir dir1 dir2 dir3 #并聯(lián)創(chuàng)建,可以同時(shí)創(chuàng)建三個(gè)文件夾
mkdir -p dir4/dir5/dir6 #串級(jí)創(chuàng)建,可以直接創(chuàng)建三層文件夾
5. cd 切換目錄 路徑
Linux系統(tǒng) 從根目錄的標(biāo)識(shí) /
[root@ hadoop001 ~]# cd /
cd dir1 #進(jìn)入dir1文件夾
cd ../ #退到上一層目錄 注意:不是上一次的目錄
cd ../../ #退到上面2層
root用戶 家目錄 /root
普通xx用戶 家目錄 /home/xx
家目錄 是 ~ 表示
如何進(jìn)當(dāng)前用戶的家目錄:
cd /root #當(dāng)前用戶的家目錄的完整路徑
cd 直接回車(chē)
cd ~
cd - #回退到上一次的目錄
[root@ hadoop001 ~]# cd dir4
[root@ hadoop001 dir4]# cd dir5/dir6
[root@ hadoop001 dir6]#
[root@ hadoop001 dir6]# cd -
[root@ hadoop001 dir4]#
6. 幫助命令 --help
[]標(biāo)識(shí)的參數(shù)可選 ... 多個(gè)參數(shù)
Usage: ls [OPTIONS]
Usage: ls XXX [OPTIONS]
[root@ hadoop001 ~]# ls --help
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.
Mandatory arguments to long options are mandatory for short options too.
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..--author with -l, print the author of each file
-b, --escape print C-style escapes for nongraphic characters--block-size=SIZE scale sizes by SIZE before printing them; e.g.,'--block-size=M' prints sizes in units of1,048,576 bytes; see SIZE format below
man 命令 比--help更加詳細(xì)