linux 常用命令

来源:互联网 发布:docker源码分析 下载 编辑:程序博客网 时间:2024/05/14 18:50



ps axu|grep mqservice-0.0.1-SNAPSHOT-20140  //查看进程
ps -ef|grep mqservice-0.0.1-SNAPSHOT-20140

tail -f nohup.out >>xie.txt    //将日志答应到 指定文件(并创建文件)
grep --color (param) xie.txt  //搜索全部匹配

history        //历史命令
vi xie.txt    //编辑 文件
vi (param) 编辑文件 --> i 编写内容 ---> ESC ----> :wq 推出保存--->q! 推出不保存

kill ..        //杀进程
ps axu        //查看所有进程
ll ls        //查看目录 的两种方式

touch (param) 创建文件
rm -rf 删除文件夹

mkdir (param) 创建文件
rm -f 强制删除文件 无提示 危险

/关键字  //搜索匹配的一个关键字
n   //下一个
N   //上一个
G   //查看 文件最后

gg  //查看 文件头部


要在linux下处理.rar文件,需要安装RAR for Linux,可以从网上下载,但要记住,RAR for Linux不是免费的;可从http://www.rarsoft.com/download.htm下载RAR 3。60 for Linux ,然后安装其安装操作如下:

# tar -xzpvf rarlinux-3.2.0.tar.gz
# cd rar
# make

直接用yum安装lrzsz(推荐) yum install lrzsz -y

rz 上传

sz 参数  下载

//查询日志行号

cat -n activex.log|grep getNowTime

 cat -n activex.log|tail -n +10855|head -n 2
 

//跨服务器copy文件

scp 文件名  root@192.168.1.3:/home/local/service/hefen_mall

:密码

exit 推出


    在使用MySql自己定义的函数时,出现错误java.sql.SQLException: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

     解决办法有三种:

     1. 登录MySql客户端,执行: SET GLOBAL log_bin_trust_function_creators = 1;
     2.在登录MySQL服务器是,在服务启动时加上 “--log-bin-trust-function-creators=1 ”参数并设置为1。

     3.在my.ini(my.cnf)中的[mysqld]区段中加上 log-bin-trust-function-creators=1。



0 0
原创粉丝点击