• 常用命令


    <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).

     
  • 相关阅读:
    Linux下守护进程的编程实现(转)
    gcc 中-I、 -L 与-l选项的作用
    va_list 、va_start、 va_arg、 va_end 使用说明
    sizeof('a')在C与C++中的区别
    Qt主要类简介
    linux命令
    linux文件编程
    linux一些基本命令
    Linux主机SSH免密设置解析
    javaweb添加拦截器
  • 原文地址:https://www.cnblogs.com/itcomputer/p/4654105.html
Copyright © 2020-2023  润新知