Leeladharan Achar - alias - leelu ~ blogging...hola mi amigos.. The Blog

Leeladharan Achar - leelu Blog. Hola mi amigos!

Move PostgreSQL9.6 data directory to a different directory in CentOS 7

We wanted to move the PostgreSQL9.6 default data directory to home directory in centos7 due to space constraints of the partition we had in our root directory. So below are the steps to move default data directory of PostgreSQL to /home directory

Create a directory in /home for postgres data

Login as root and execute below commands

user$ su -l ... 

                        
More ...

AWS CLI Commands to download/upload files to S3

S3 is one of the most widely used AWS offerings. After installing awscli (see references for info) you can access S3 operations in two ways:

$ aws s3 <command> (for simple filesystem stuff like mv, cp and so on) $ aws s3api <command> (for other operations) 

Use --help to view

We will use "samplebucket" as an example bucket name ...

More ...

openssl error while installing flask-scrypt on mac OS

To fix openssl error while installing flask-scrypt or scrypt extension. Execute below steps

(venv)$export CFLAGS="-I$(brew --prefix openssl)/include $CFLAGS" (venv)$export LDFLAGS="-L$(brew --prefix openssl)/lib $LDFLAGS" (venv)$pip install scrypt 
More ...

running multiple sql queries in jmeter

Below are the steps to be followed to run multiple queries in jmeter

I did some google search and here were the pages where i landed to see how it's done

https://stackoverflow.com/questions/25443582/jmeter-launch-several-sql-requests

But, actual steps on how to do it was not mentioned. So below are the steps to do the same.

First have all sql queries to be executed ...
More ...

Handy Commands

Find in all files recursively for a specific string

 find ./ -type f -name "*.*" -exec grep -inH "searchstring" {} \; 

to search in all specific file extensions recursively

 find ./ -type f -name "*.php" -exec grep -inH "searchstring" {} \; 

In a specific directory search for specific file extension and count number of lines in ...

More ...