大數據筆記-0907

2019獨角獸企業重金招聘Python工程師標準>>> hot3.png

復習:
1.clear清屏
2.vi
vi xxx.log
i-->edit
esc-->command
shift+:-->end ?輸入 wq

3.cat xxx.log 查看


---------------------------
1.pwd 查看當前光標所在的path

2.家目錄
/boot
swap
/ 根目錄 起始位置

家目錄: 用戶所在的默認的目錄
/root 超級admin
/home/jepson
/home/doudou
/home/xxxx

3.cd 切換
cd path 當前的路徑切換到你指定的path
cd /root?

cd ? ? 切換當前用戶的家目錄
cd ~ ? 切換當前用戶的家目錄

cd - ? 切換到上一次目錄
cd ../ 切換到上一層目錄?
? ?../../?


?4.ls
?查看當前目錄下的文件和文件夾的名稱

?ls -l ==> ll 查看當前目錄下的文件和文件夾的詳細信息
?ls -l -a ==》查看隱藏文件
?隱藏文件:文件或文件夾名稱以.開頭

?ls -l -h 文件的大小(不是文件夾)
?ls -l -rt 按時間排序?

?5.文件夾
?mkdir 文件夾名稱 1層
?mkdir -p 1/2/3 -p級聯創建
?mkdir 4 5 6 同一層創建3個目錄


?6.路徑
?絕對目錄 /xxx/xxx
?相對路徑 參加pwd當前路徑


7.文件
vi jepson.log
touch ruoze.log

文件 文件夾 切換 查看

8.移動 只有1份
mv xxx yyyy

9.復制 多份
cp xxx yyyy 文件
cp -r 4 1 文件夾

10.查看文件內容
cat xxx.log 一下子將內容刷新出來
more xxx.log 一頁頁按 【空格鍵】 翻下;【B】上
?? ??? ?按 ctrl+z終止
less xxx.log ?不多

11. > 箭頭
> 覆蓋?
>> 追加

[root@hadoop000 ruozedata]# cat jepson.log >>ruoze.log
[root@hadoop000 ruozedata]# cat ruoze.log
4
5
6
1
2
3
[root@hadoop000 ruozedata]# cat jepson.log >ruoze.log
[root@hadoop000 ruozedata]# cat ruoze.log
1
2
3
[root@hadoop000 ruozedata]#?


12.打印
[root@hadoop000 ruozedata]# echo "summer"?
[root@hadoop000 ruozedata]# echo "summer" ?> jepson.log
[root@hadoop000 ruozedata]# echo "summer" ?>> ruoze.log?


13.別名 alias
ls -l ==> ll

[root@hadoop000 ruozedata]# alias cdrz='cd /root/ruozedata' 臨時
[root@hadoop000 ruozedata]#?
[root@hadoop000 ruozedata]# alias
alias cdrz='cd /root/ruozedata'
alias cp='cp -i'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias mv='mv -i'
alias rm='rm -i'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
[root@hadoop000 ruozedata]# cd
[root@hadoop000 ~]# cdrz
[root@hadoop000 ruozedata]#?


14.環境變量文件
全局: /etc/profile
source /etc/profile

個人: 家目錄 隱藏文件
.bash_profile
.bashrc

source .bash_profile
. .bash_profile


15.su 切用戶
[root@hadoop000 ~]# su jepson ?直接切
[jepson@hadoop000 root]$ pwd
/root
[jepson@hadoop000 root]$ exit
exit
[root@hadoop000 ~]#?
[root@hadoop000 ~]# su - jepson (生產)切用戶 進入家目錄 執行環境變量文件
[jepson@hadoop000 ~]$ pwd
/home/jepson
[jepson@hadoop000 ~]$?


[root@hadoop000 jepson]# ls -l -a
total 28
drwx------. 4 jepson jepson 4096 Sep ?6 06:32 .
drwxr-xr-x. 3 root ? root ? 4096 Sep ?6 06:32 ..
-rw-r--r--. 1 jepson jepson ? 18 Jul 18 ?2013 .bash_logout
-rw-r--r--. 1 jepson jepson ?176 Jul 18 ?2013 .bash_profile
-rw-r--r--. 1 jepson jepson ?124 Jul 18 ?2013 .bashrc
drwxr-xr-x. 2 jepson jepson 4096 Nov 12 ?2010 .gnome2
drwxr-xr-x. 4 jepson jepson 4096 Sep ?6 04:50 .mozilla
[root@hadoop000 jepson]#?


16.刪除
rm
rm -f 文件
rm -rf ?文件夾
rm -r -f ?文件夾
[root@hadoop000 ruozedata]# rm jepson.log?
rm: remove regular file `jepson.log'? y
[root@hadoop000 ruozedata]#?
[root@hadoop000 ruozedata]# rm -f ruoze.log
[root@hadoop000 ruozedata]#?
[root@hadoop000 ruozedata]# rm -r 6
rm: descend into directory `6'? y
rm: remove regular empty file `6/ruoze.log'? y
rm: remove directory `6'? y
[root@hadoop000 ruozedata]# rm -rf 5
[root@hadoop000 ruozedata]#?

17.查看歷史命令
history
!27

18.用戶 用戶組
[root@hadoop000 ~]# ll /usr/sbin/user*
-rwxr-x---. 1 root root 103096 Dec ?8 ?2011 /usr/sbin/useradd
-rwxr-x---. 1 root root ?69560 Dec ?8 ?2011 /usr/sbin/userdel
-rws--x--x. 1 root root ?42384 Aug 23 ?2010 /usr/sbin/userhelper
-rwxr-x---. 1 root root ?98680 Dec ?8 ?2011 /usr/sbin/usermod
-rwsr-xr-x. 1 root root ? 9000 Nov 23 ?2013 /usr/sbin/usernetctl
[root@hadoop000 ~]#?
[root@hadoop000 ~]#?

[root@hadoop000 ~]# ll /usr/sbin/group*
-rwxr-x---. 1 root root 54968 Dec ?8 ?2011 /usr/sbin/groupadd
-rwxr-x---. 1 root root 46512 Dec ?8 ?2011 /usr/sbin/groupdel
-rwxr-x---. 1 root root 50800 Dec ?8 ?2011 /usr/sbin/groupmems
-rwxr-x---. 1 root root 61360 Dec ?8 ?2011 /usr/sbin/groupmod
[root@hadoop000 ~]#?

[root@hadoop000 ~]# useradd ruoze
[root@hadoop000 ~]# id ruoze
uid=502(ruoze) gid=502(ruoze) groups=502(ruoze)
創建ruoze用戶 同時創建ruoze用戶組 同時gid(主組)為ruoze
groups 所有組 逗號分隔

[root@hadoop000 ~]# userdel ruoze ?刪除只刪除用戶 不擅長用戶組及家目錄

[root@hadoop000 ~]# useradd ?ruoze 再創建
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.?
Creating mailbox file: File exists
[root@hadoop000 ~]#?
[root@hadoop000 ~]# ll /home/
total 12
drwx------. 4 jepson jepson 4096 Sep ?7 22:17 jepson
drwx------. 4 ruoze ?ruoze ?4096 Sep ?7 22:48 ruoze
drwx------. 4 rz ? ? rz ? ? 4096 Sep ?7 22:34 rz
[root@hadoop000 ~]#?

[root@hadoop000 ~]# cat /etc/passwd | grep ruoze
ruoze:x:502:502::/home/ruoze:/bin/bash
用戶 ? ?用戶組 主組 ?家目錄 ?執行的命令類型

su 切用戶切不過去
/sbin/nologin
/bin/false

[root@hadoop000 ~]# cat /etc/group |grep ruoze
ruoze:x:502:
[root@hadoop000 ~]#?

--------------------------------

[root@hadoop000 ~]# groupadd bigdata
[root@hadoop000 ~]# cat /etc/group |grep bigdata
bigdata:x:503:
[root@hadoop000 ~]# usermod -a -G bigdata ruoze
[root@hadoop000 ~]# id ruoze
uid=502(ruoze) gid=502(ruoze) groups=502(ruoze),503(bigdata)
[root@hadoop000 ~]#?
[root@hadoop000 ~]# usermod -g bigdata ruoze
[root@hadoop000 ~]# id ruoze
uid=502(ruoze) gid=503(bigdata) groups=503(bigdata)
[root@hadoop000 ~]#?


19.命令查看
[root@hadoop000 ~]# man usermod
[root@hadoop000 ~]# usermod --help
Usage: usermod [options] 用戶名稱 ?Usage第一行 ?[] 可選


usermod -a -G bigdata ruoze
usermod --append --groups bigdata ?ruoze

[root@hadoop000 ~]# usermod --append --groups bigdata ?ruoze
[root@hadoop000 ~]# id ruoze
uid=502(ruoze) gid=503(bigdata) groups=503(bigdata)
[root@hadoop000 ~]# usermod -d /tmp ruoze
[root@hadoop000 ~]#?
[root@hadoop000 ~]#?
[root@hadoop000 ~]# cat /etc/passwd |grep ruoze
ruoze:x:502:503::/tmp:/bin/false
[root@hadoop000 ~]#?


作業:
1.環境準備好
2.開博客 給班長
3.今天的命令敲一次 做筆記 寫博客

轉載于:https://my.oschina.net/u/3862440/blog/2248926

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/389460.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/389460.shtml
英文地址,請注明出處:http://en.pswp.cn/news/389460.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Tensorflow框架:目標檢測Yolo思想

Yolo-You Only Look Once YOLO算法采用一個單獨的CNN模型實現end-to-end的目標檢測: Resize成448448,圖片分割得到77網格(cell)CNN提取特征和預測:卷積部分負責提取特征。全鏈接部分負責預測:過濾bbox(通過nms&#…

線性回歸非線性回歸_了解線性回歸

線性回歸非線性回歸Let’s say you’re looking to buy a new PC from an online store (and you’re most interested in how much RAM it has) and you see on their first page some PCs with 4GB at $100, then some with 16 GB at $1000. Your budget is $500. So, you es…

樸素貝葉斯和貝葉斯估計_貝葉斯估計收入增長的方法

樸素貝葉斯和貝葉斯估計Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works wi…

numpy統計分布顯示

import numpy as np from sklearn.datasets import load_iris dataload_iris()petal_lengthnumpy.array(list(len[2]for len in data[data]))#取出花瓣長度數據 print(np.max(petal_length))#花瓣長度最大值 print(np.mean(petal_length))#花瓣長度平均值 print(np.std(petal_l…

python數據結構:進制轉化探索

*********************************第一部分******************************************************************************************************************************************************************************************# 輸入excel的行號,…

Keras框架:人臉檢測-mtcnn思想及代碼

人臉檢測-mtcnn 概念: MTCNN,英文全稱是Multi-task convolutional neural network,中文全稱是多任務卷積神經網絡, 該神經網絡將人臉區域檢測與人臉關鍵點檢測放在了一起。 從工程實踐上,MTCNN是一種檢測速度和準確率…

python中格式化字符串_Python中所有字符串格式化的指南

python中格式化字符串Strings are one of the most essential and used datatypes in programming. It allows the computer to interact and communicate with the world, such as printing instructions or reading input from the user. The ability to manipulate and form…

Javassist實現JDK動態代理

提到JDK動態代理,相信很多人并不陌生。然而,對于動態代理的實現原理,以及如何編碼實現動態代理功能,可能知道的人就比較少了。接下一來,我們就一起來看看JDK動態代理的基本原理,以及如何通過Javassist進行模…

數據圖表可視化_數據可視化如何選擇正確的圖表第1部分

數據圖表可視化According to the World Economic Forum, the world produces 2.5 quintillion bytes of data every day. With so much data, it’s become increasingly difficult to manage and make sense of it all. It would be impossible for any person to wade throug…

Keras框架:實例分割Mask R-CNN算法實現及實現

實例分割 實例分割(instance segmentation)的難點在于: 需要同時檢測出目標的位置并且對目標進行分割,所以這就需要融合目標檢測(框出目標的位置)以及語義分割(對像素進行分類,分割…

機器學習 缺陷檢測_球檢測-體育中的機器學習。

機器學習 缺陷檢測🚩 目標 (🚩Objective) We want to evaluate the quickest way to detect the ball in a sport event in order to develop an Sports AI without spending a million dollars on tech or developers. Quickly we find out that detec…

莫煩Pytorch神經網絡第二章代碼修改

import torch import numpy as np""" Numpy Torch對比課程 """ # #tensor與numpy格式數據相互轉換 # np_data np.arange(6).reshape((2,3)) # print(np_data) # # torch_data torch.from_numpy(np_data) # print(\n,torch_data) # # tensor2ar…

自定義字符類

當 VC不使用MFC,無法使用屬于MFC的CString,為此自定義一個,先暫時使用,后續完善。 頭文件: #pragma once#define MAX_LOADSTRING 100 // 最大字符數class CString {public:char *c_str, cSAr[MAX_LOADSTRING];WCHAR *w…

使用python和javascript進行數據可視化

Any data science or data analytics project can be generally described with the following steps:通常可以通過以下步驟來描述任何數據科學或數據分析項目: Acquiring a business understanding & defining the goal of a project 獲得業務理解并定義項目目…

Android 事件處理

事件就是用戶對圖形的操作,在android手機和平板電腦上,主要包含物理按鍵事件和觸摸屏事件兩類。物理按鍵事件包含:按下、抬起、長按等;觸摸屏事件主要包含按下、抬起、滾動、雙擊等。 在View中提供了onTouchEvent()方法&#xff0…

莫煩Pytorch神經網絡第三章代碼修改

3.1Regression回歸 import torch import torch.nn.functional as F from torch.autograd import Variable import matplotlib.pyplot as plt""" 創建數據 """x torch.unsqueeze(torch.linspace(-1,1,100),dim1) y x.pow(2) 0.2*torch.rand(x…

為什么餅圖有問題

介紹 (Introduction) It seems as if people are split on pie charts: either you passionately hate them, or you are indifferent. In this article, I am going to explain why pie charts are problematic and, if you fall into the latter category, what you can do w…

New Distinct Substrings(后綴數組)

New Distinct Substrings&#xff08;后綴數組&#xff09; 給定一個字符串&#xff0c;求不相同的子串的個數。\(n<50005\)。 顯然&#xff0c;任何一個子串一定是后綴上的前綴。先&#xff08;按套路&#xff09;把后綴排好序&#xff0c;對于當前的后綴\(S_i\)&#xff0…

Android dependency 'com.android.support:support-v4' has different version for the compile (26.1.0...

在項目中加入react-native-camera的時候 出現的錯誤. 解決方案: 修改 implementation project(:react-native-camera)為 implementation (project(:react-native-camera)) {exclude group: "com.android.support"}查看原文 Could not find play-services-basement.aa…

先知模型 facebook_使用Facebook先知進行犯罪率預測

先知模型 facebookTime series prediction is one of the must-know techniques for any data scientist. Questions like predicting the weather, product sales, customer visit in the shopping center, or amount of inventory to maintain, etc - all about time series …