常用命令

<1>

history  -w             //-w     Write the current history to the history file, overwriting the history file’s contents.

cat   ~/.bash_history           //命令保存文件路径.

history   -c       //-c     Clear the history list by deleting all the entries.

<2>获取ifconfig地址.

# ifconfig |grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"
192.168.8.21

<3>

find . -path "./hbase-0.94.19" -prune -o -print                   //找出除了"hbase-0.94.19"的目录(验证有问题)

具体应该是-prune这个参数
比如你想找某个dll文件,但不想找./dirname这个文件夹应该这么写

find . -path "./dirname" -prune -o -name "*.dll" -print

<4>

wget -P /data  http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-$mysql_version-linux-glibc2.5-x86_64.tar.gz

-P prefix        //下载的目录
       --directory-prefix=prefix
           Set directory prefix to prefix.  The directory prefix is the directory where all other files and subdirectories will be saved to, i.e. the
           top of the retrieval tree.  The default is . (the current directory).

 
原文地址:https://www.cnblogs.com/itcomputer/p/4654105.html