#Linux

BASH Rename all file in a directory

for file in *.png;do mv "$file" "${file/_h.png/_half.png}"; done Another use case: foo=” ” # replace first blank only bar=${foo/ /.} # replace all blanks bar=${foo// /.}

Read more

Install the JDK on Ubuntu server

Install the JDK Download he 32bit or 64bit Linux “compressed binary file” – it has a “.tar.gz” file extension i.e. “[java-version]-i586.tar.gz” for 32bit and “[java-version]-x64.tar.gz” for 64bit Uncompress…

Read more

my minimum dot bashrc file

Here is one of the few minimum configurations I like to have on my personal .bashrc file export PS1="\[\033[0;36m\]{\[\033[0;50m\]\w/\[\033[0;36m\]} \[\033[0;32m\]what now… \[\033[0;39m\]" Ok, mac doesn’t have a proper…

Read more