Chen Jian's Java Blog 

Tools in Ubuntu

by Chen Jian


Posted on 2018-08-28 12:00 in Linux/Unix/Windows


DBeaver - Much better than MySQL Workbench and it serves all kinds of DBMS-es


A linux function to make current java code directory into a tarball without including unwanted files

by Chen Jian


Posted on 2018-06-17 12:00 in Linux/Unix/Windows


Put the following function into your ~/.bashrc, and run "tarcode" in your code directory. It will generate a *.tgz file under ~/temp tarcode() { filename=`basename "$PWD"` filename+='-' filename+=`date...


The most reliable way of setting up username/password for Ethernet connection on Centos

by Chen Jian


Posted on 2017-10-30 12:00 in Linux/Unix/Windows


sudo yum install nmtui sudo nmtui Then "Activate Connection". Then the system will prompt you to input username/password


grep

by Chen Jian


Posted on 2016-10-17 12:00 in Linux/Unix/Windows


grep "hello" *.csv zgrep "hello" *.csv.gz


How to find out why a process crashed on centos ?

by Chen Jian


Posted on 2016-03-08 12:00 in Linux/Unix/Windows


You can check /var/log/messages, search "Kill" on that file


通过shell脚本在服务器上一键构建java应用并重新部署

by Chen Jian


Posted on 2015-01-18 12:00 in Linux/Unix/Windows


1. 把代码从github等托管服务器上更新下来 2. 编译成war文件 3. 重启tomcat 第一次使用时,先手动地把代码拉到一个固定的目录中 cd /home/me/myappsite/code git clone https://someuser@somesite/myapp.git 一键脚本:build-my.sh #!/bin/sh echo "pull and build" cd...


中文mac终端里运行javac命令乱码?

by Chen Jian


Posted on 2014-02-20 12:00 in Linux/Unix/Windows


设置一下终端的charset即可 iterm也照样设置


转:通过ssh-keygen实现免密码登录

by Chen Jian


Posted on 2014-02-10 12:00 in Linux/Unix/Windows


看这里: http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/ mac下没有ssh-copy-id这个命令,可以从这里安装一个 https://github.com/beautifulcode/ssh-copy-id-for-OSX


linux最大可打开文件数的几种设置

by Chen Jian


Posted on 2013-10-23 12:00 in Linux/Unix/Windows


http://johanlouwers.blogspot.de/2010/02/hard-limit-for-maximum-open-file.html 这篇文章区分介绍了user-specific/system-wide的fd limits, 以及hard limit和soft limit. 具体设置: http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/ ...


考虑到编码问题,最好不要在远程登录工具里向数据库写入非西欧字符

by Chen Jian


Posted on 2013-07-14 12:00 in Linux/Unix/Windows


用远程登录工具(如putty)登录远程主机后,再在工具的窗口里登录数据库,然后写入非西欧字符,很容易导致乱码。 今天我就是这样遇到乱码的:   1. 在xshell窗口里登录localhost数据库,用insert语句插入汉字,页面显示乱码,虽然主机、数据库、php的字符集方式都是乱码。   2. 改用 mysql> source sql文件,仍然乱码。 远程登录工具在编码问题上一直都牵扯不清。为了避免乱码,最好使用下列方式之一:   1....


linux中从一个管理员切换成另一个管理员

by Chen Jian


Posted on 2013-07-02 12:00 in Linux/Unix/Windows


引用 sudo su admin


linux下以常见格式打印当前时间

by Chen Jian


Posted on 2013-06-01 12:00 in Linux/Unix/Windows


引用 $date +%Y%m%d%H%M%S  ## yyyyMMddHHmmss, 如20130601160505


为什么vim不能正确地缩进html?

by Chen Jian


Posted on 2013-05-25 12:00 in Linux/Unix/Windows


你需要这样: 引用 You have to add the following lines to your .vimrc to make sure vim uses file-specific indentions: filetype on filetype plugin on filetype indent on 看这里: http://stackoverflow.com/questions/10213744/vim-...


通过命令行把内容复制到公共网站,然后让人看

by Chen Jian


Posted on 2013-05-23 12:00 in Linux/Unix/Windows


dpaste pastebin pastie wgetpaste 看这里


windows主机 + virtualbox + ubuntu宿机共享文件夹

by Chen Jian


Posted on 2013-05-07 12:00 in Linux/Unix/Windows


1. 先在virtualbox里配一下 2. 启动ubuntu后,sudo vi /etc/rc.local, 有exit 0之前加上: 引用 mount.vboxsf -o rw,uid=1000,gid=1000 KentLinuxTools /home/kent/dev/tools 3. 执行:sudo /etc/rc.local