cd
1
cd /usr/local
2
cd ..
3
cd ~
ls
4/usr
cd /usr
ls -al
mkdir
5/tmpa,
cd /tmp
mkdir a
ls -al
6a1/a2/a3/a4
mkdir -p a1/a2/a3/a4
rmdir
7a/tmp
rmdir a
8a1/a2/a3/a4
rmdir -p a1/a2/a3/a4
ls -al
补充:sudo命令用来以其他身份来执行命令,预设的身份为root。在/etc/sudoers中设置了可执行sudo指令的用户。若其未经授权的用户企图使用sudo,则会发出警告的邮件给管理员。用户使用sudo时,必须先输入密码,之后有5分钟的有效期限,超过期限则必须重新输入密码。
cp
9.bashrc/usrbashrc1
sudo cp ~/.bashrc /usr/bashrc1
10/tmptest/usr
cd /tmp
mkdir test
sudo cp -r /tmp/test /usr
mv
11bashrc1/usr/test
sudo mv /usr/bashrc1 /usr/test
12testtest2
sudo mv /usr/test /usr/test2
rm
13bashrc1
sudo rm /usr/test2/bashrc1
14test2
sudo rm -r /usr/test2
cat
15.bashrc
cat ~/.bashrc
tac
16.bashrc
tac ~/.bashrc
more
17.bashrc
more ~/.bashrc
head
18.bashrc20
head -n 20 ~/.bashrc
19.bashrc50
head -n -50 ~/.bashrc
tail
20.bashrc20
tail -n 20 ~/.bashrc
21.bashrc50
tail -n +50 ~/.bashrc
touch
22/tmphello
cd /tmp
touch hello
ls -l hello
23hello5
touch -d “5 days ago” hello
chown
24helloroot
sudo chown root /tmp/hello
ls -l /tmp/hello
find
25.bashrc
find ~ -name .bashrc
tar
26/test,/test.tar.gz
sudo mkdir /test
sudo tar -zcv -f /test.tar.gz test
27/tmp目录
sudo tar -zxv -f /test.tar.gz -C /tmp
grep
28/.bashrc'examples'
grep -n 'examples' ~/.bashrc
29Java/.bashrc
gedit ~/.bashrc
source ~/.bashrc
30JAVA_HOME
echo $JAVA_HOME
HDFS
31hadoopHDFShadoop目录/usr/local/hadoop
./bin/hdfs dfs -mkdir -p /user/hadoop
32text
./bin/hdfs dfs -mkdir test
./bin/hdfs dfs -ls .
33/.bashrcHDFStesttest
./bin/hdfs dfs -put ~/.bashrc test
./bin/hdfs dfs -ls test
34HDFStest
./bin/hdfs dfs -get test ./test