Contained here are trival stuffs. Like with all trival stuffs, its inevitably bound to be forgotten.
Description | Command |
---|---|
List only directories | ls -l | grep ^d |
Count number of files & directories | ls -l | tail +2 | wc -l |
Command prompt coloring__ (Add to ~/.bash_profile) \n Color reference here | export PS1="\e[36;1m[\W] \e[0m" |
Colorizing terminal (Add to ~/.bash_profile) | export CLICOLOR=1 \n export LSCOLORS=gacadxFxCxDxBxegedabagace |
More info here
-
Search for process with keyword
ps aux | grep "keyword"
-
Deploy to remote Tomcat Server (Tomcat 7 and upward)
curl --upload-file path-to-archive.war "http://username:[email protected]:8080/manager/text/deploy?path=/app&update=true"
More info here
-
List all entries in Path Environment Variable in separate lines
set Path | tr ';' '\n'
Find directory with name containing log in current directory
find . -type d -name '*log*'
Find file with name containing server in current directory
find . -name '*server*'
First list active docker containers and pipe that to xargs to run docker inspect
docker ps -q | xargs -n 1 -I % -p docker inspect % -f "{{json .NetworkSettings.Networks}}"
- Create new user
View this gist here: https://gist.io/@prashanta/4600997