Unix&Linux
用户组
添加用户
useradd xiaoming
passwd xiaoming
添加用户组
groupadd newusergroup
usermod -aG newusergroup xiaoming
设置默认目录
usermod -d /home/xiaoming xiaoming
查看用户组
cat /etc/group
添加用户组ssh权限
vim /etc/ssh/sshd_config
AllowUsers:username
AllowGroups:groupname
重启ssh服务
service sshd restart
Docker
设置镜像源
修改/etc/docker/daemon.json
{
registry:xxx
}
基础指令
service docker start
service docker stop
service docker restart
docker ps
docker ps -a
docker stop
docker images
docker exec -it 9c8 /bin/bash
docker pull ubuntu:16.04
docker search ubuntu
docker cp file e7d53:file
docker network ls
Hadoop
hadoop
hadoop fs -rm -r -skipTrash output
hadoop fs -ls output
hadoop fs -mkdir -p input
hdfs
hdfs dfs -cat output/part-r-00000
hdfs dfs -put ./input/* input
Maven
设置镜像源
setting.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>/Users/xiaoming/.m2/repository</localRepository>
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
</servers>
<mirrors>
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central</url>
</mirror>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>central</id>
<name>Maven Repository Switchboard</name>
<url>http://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2</url>
</mirror>
<mirror>
<id>ibiblio</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
</mirror>
<mirror>
<id>jboss-public-repository-group</id>
<mirrorOf>central</mirrorOf>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</mirror>
<mirror>
<id>google-maven-central</id>
<name>Google Maven Central</name>
<url>https://maven-central.storage.googleapis.com
</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- 中央仓库在中国的镜像 -->
<mirror>
<id>maven.net.cn</id>
<name>oneof the central mirrors in china</name>
<url>http://maven.net.cn/content/groups/public</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
<profile>
<id>repository_set</id>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>public</id>
<name>Public Repository</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>public</id>
<name>Public Repository</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
Git
git reset --hard 97f
彻底删除文件/文件夹
git filter-branch --force --index-filter ‘git rm --cached --ignore-unmatch path-to-your-remove-file’ --prune-empty --tag-name-filter cat – --all
git filter-branch --force --index-filter ‘git rm -r --cached --ignore-unmatch path-to-your-remove-file’ --prune-empty --tag-name-filter cat – --all
清理回收空间
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --prune=now
git gc --aggressive --prune=now
强制提交本地代码到远程
git push -f --all