Category: Linux

0

grep for a word in all files in linux

The fol­low­ing com­mand will search for the string “hello” in the con­tent of all the files within all sub­fold­ers of the spec­i­fied path grep –r “hello” /path/to/search/

0

How to create scripts in terminal

Fol­low three sim­ple steps to auto­mate your ter­mi­nal. Cre­ate a script Set the per­mis­sions Exe­cute the script Cre­ate a script test.sh $vi test.sh ls –la echo ‘Hello Bash!’ Set the per­mis­sions $sudo chmod 777…

0

How to create a permanent “alias”?

Fol­low three sim­ple steps to cre­ate alias for your com­mand line. cd ls –la vi .bashrc Append your favorite alias at the bot­tom of the file. Below are some of my favorite aliases. # alias…

0

[: !=: unary operator expected

In bash, always use the dou­ble bracket con­di­tional com­mand [[ … ]] For exam­ple, #!/bin/bash sex=male if [[ $sex == ‘male’ ]];then echo “sex is male.” elif [[ $sex == ‘female’ ]];then echo “sex…

1

Setup remote selenium driver

Do you want your Jenk­ins plan to run your func­tional automa­tion tests to run against remote sele­nium host? Do you need help in set­ting up remote sele­nium host? Then this tuto­r­ial will teach you…

0

Install Java on Ubuntu

The eas­i­est way to install Ora­cle Java 8 is to run the fol­low­ing com­mands from the ter­mi­nal. $ sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get update $ sudo apt-get install oracle-java8-installer Ver­ify the installed Java…

0

Linux set environment variables

I will show you how to update your PATH vari­able on Linux machine so it can always find the node and npm. export NPM_HOME=/FOO/npm/node-v0.12.5-linux-x64/bin export PATH=$PATH:$NPM_HOME You do not need to update your PATH variable…

0

How to check which ports are listening on Ubuntu

If you are run­ning your own vps, or even doing local devel­op­ment on an Ubuntu, some­times your appli­ca­tion wont start because it screams that another port is already lis­ten­ing on the port you are…