빅 데이터 + 0 기초 + Liux 명령 (3)
2806 단어 제로 베이스
mkdir
rm cp mv cd
mkdir gaoshan gaoshan
touch
rm cp mv cat more less
touch liushui liushui
알림: 생산 중 vi 를 사용 할 때 수정 내용 을 편집 할 때 원본 cp 한 권 을 저장 합 니 다. 예 를 들 어 cp liushui luishiu 20190303 다음 에 liushui 를 편집 합 니 다.
2. vi 명령 행 상용 명령
dd
dG
ndd n
gg
G
shift+¥
3. 파일 비우 기 liushui
gg dG
echo "' >> liushui , 1
:shll
cat /dev/null >> liushui , 0
4. 추가 텍스트
G shift+¥ , ,
5. 빠 른 포 지 셔 닝 키워드
shift+:
/ /
N ,n
6, 텍스트 에 줄 번 호 를 추가 / 삭제 하려 면
shift+:
set nu
set nonu
7. 파일 / 폴 더 권한:
drwxr-xr-x. 2 root root 4096 Jan 19 20:44 4
:
d
x
r: 4
w: 2
x; shell 1
-: 0
:
rwxr-xr-x 755
:
:rwx 7 :
:r-x 5 :
:r-x 5 :
/
:
ll -h
du -sh /
:
8. 폴 더 / 파일 수정 권한
chmod
chmod 755 liushui
liushui 75
9. 폴 더 및 폴 더 내 파일 에 권한 부여
chown -R
chown -R gaoshan 755
gaoshan 755
10. mysql / linux 사용자 권한 소개:
mysadmin
755
linux :
11. 파일 에 X 권한 부여
vi gaoshan.log
i
#!/bin/bash
sh gaoshan.log
12. 소프트 연결, 윈도 우즈 단축 키 에 해당
In -s
XXX
In -s xxx/xxx.log
13. 업로드 / 다운로드
lrzsz
rz windows liunx
sz liunx window
14. 시스템 현재 운행 상황 보기
top
load average: 0.00, 0.00, 0.00 5/10/15 10
free -m
df -h
14. /
zip
zip unzip
zip -r gaoshan.zip gaoshan/*
gaoshan ,*
unzip gaoshan.zip
gaoshan.zip
tar
tar -czvf gaoshan.tar.gz gaoshan/*
gaoshan gaoshan.tar.gz
tar -xzvf gaoshan.tar.gz
gaoshan.tar.gz
15. 다운로드
wget
16. 스케줄 링
crontab -e
crontab -l
* * * * * /root/test.sh >> /root/test.log
*
*
*
*
*
*
:
10
sleep 10s
[root@hadoop001 ~]# cat test1.sh
#!/bin/bash
for((i=1;i<=6;i++));
do
date
sleep 10s
done
exit
17. 백 스테이지 에서 명령 을 실행 하고 상호작용 을 하지 않 습 니 다.
&
./test.sh &
nohup ./test.sh &
nohup ./test.sh > /root/test.log 2>&1 &