Java Scrap Book  

Linux Command for daily use

How to kill all the Java process using shell command

ps -ef | grep java | grep -v grep | awk ' {print "kill -9 " $2}' |sh

Table of Content

How to exclude all "permission denied" -message from "find ."

if you would like to find all git client in your computer. you can execute below command.

$find / -name *.git 2>/dev/null

$find directory-to-search -name name-of-fine 2>/dev/null

Table of Content

How to get nth line from a file using Linux commands

1. head -n file| tail -1

Table of Content How to get all blank line from a file. grep '^\s*$' file grep '^$' file How to remove all blank line from a file. grep -v '^$' file grep -v '^\s*$' file How to remove line which contains test sed '/test/d' file

Copyright © 2013-2017

javascrapbook.com is a computer science content service should not be treated as the publisher or speaker of any information provided by another Computer Science content provider.

Contact email: help@javascrapbook.com

<