MY unix commands

tail a file tail -100f FileName -f to allow file monitoring less command Another way is to watch file using less +F FileName to wait for new data. use ctrl+c to exit to the normal less mode to do search/page uptown etc. once down, we can hit F again to the watch mode. less only opens chunk of file so…

run bat from intellij

External tools The External Tools feature allows you to: add custom menu items to run external programs, scripts, .bat files, etc. parametrize custom commands with a rich set of macros, such as path to the currently opened file in the editor, project classpath, project output path, etc. assign custom shortcuts to the most frequently used…

copy file through ssh

I use winscp or secure shell client.   sftp is (and works) similar to ftp scp is a neat little program: copy from a remote machine to my machine: scp user@192.168.1.100:/home/remote_user/Desktop/file.txt /home/me/Desktop/file.txt copy from my machine to a remote machine: scp /home/me/Desktop/file.txt user@192.168.1.100:/home/remote_user/Desktop/file.txt copy all file*.txt from a remote machine to my machine (file01.txt, file02.txt,…

netstat command show listening ports

Netstat is a useful tool for checking network and Internet connections. Some useful applications for the average PC user are considered, including checking for malware connections.   Syntax and switches The command syntax isnetstat [-a] [-b] [-e] [-f] [-n] [-o] [-p proto] [-r] [-s] [-t] [-v] [interval]A brief description of the switches is given in…

JAVA_HOME in windows 7

Windows: The SetX command would do so: setx /M JAVA_HOME “C:\Program Files (x86)\Java\jdk1.6.0_17” /m means machine level. To check the settings, use “set” command for all the variables. Use “echo %JAVA_HOME%” to check it specifically. To append to the PATH: setx path “%PATH%;c:\home” /m Here is a good site for windows commands    Unix In Unix, go…

open MySQL in CentOs and auto start

* To start mysql server: /etc/init.d/mysqld start * To stop mysql server: /etc/init.d/mysqld stop * To restart mysql server /etc/init.d/mysqld restart Tip: Redhat Linux also supports service command, which can be use to start, restart, stop any service: # service mysqld start # service mysqld stop # service mysqld restart To make it auto start:…