Custom Search

Thursday, January 28, 2016

Linux Ubuntu Run command in watch mode and append output to a file and print in terminal

Run command in watch mode and append output to a file and print in terminal

$watch "myscript.sh 2>&1 | tee -a mylog.txt"








Wednesday, January 20, 2016

git How to see the changes in a commit


$git diff 230c23ddd5b8ecde960ac9c57c4019da039f4940^!

* add ^! at the end



Thursday, January 14, 2016

Ubuntu Hide current working directory in terminal

1)
$vim ~/.bashrc

export PS1='$ '

2)
$source ~/.bashrc


Tuesday, January 12, 2016

How to Install pdfedit In Ubuntu Linux

1)
Download and Install libqt3-mt

$wget http://us.archive.ubuntu.com/ubuntu/pool/main/q/qt-x11-free/libqt3-mt_3.3.8-b-8ubuntu3_amd64.deb

$sudo dpkg -i libqt3-mt_3.3.8-b-8ubuntu3_amd64.deb

2)
Download and Install pdfedit

$wget http://us.archive.ubuntu.com/ubuntu/pool/universe/p/pdfedit/pdfedit_0.4.5-2_amd64.deb

$sudo dpkg -i pdfedit_0.4.5-2_amd64.deb

Saturday, January 9, 2016

How to Install vagrant-scp plugin and copy file from Vagrant VM to Host Machine

1)
Install vagrant-scp plugin
a)
$vagrant plugin install vagrant-scp

b)
$vagrant scp [local_path] [vm_name]:[remote_path]
$vagrant scp [vm_name]:[remote_path] [local_path]

OR

2)
a)
How to copy file from Host Machine to Vagrant VM
$scp -i /root/puppet-vpc/.vagrant/machines/vpc-ctrl1/virtualbox/private_key -P 2201 myfile.txt vagrant@127.0.0.1:~

b)
How to copy file from Vagrant VM to Host Machine

$scp -i /root/puppet-vpc/.vagrant/machines/vpc-ctrl1/virtualbox/private_key -P 2201 vagrant@127.0.0.1:~/myfile.txt .

Friday, January 8, 2016

neutron net-list filter by tenant

1)
#neutron net-list --tenant_id 8144d33074674d11baadf40e6f92fa15

#curl -g -i -X GET https://network.jiocloud.com:9696/v2.0/networks.json?tenant_id=8144d33074674d11baadf40e6f92fa15 -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}6c2acb7389ddd912936fad33f260b7e24ce9ed70"








Tuesday, January 5, 2016

grep exclude files with extension


$grep -l --exclude=*.py --exclude=*.cc --exclude=*.h -r searchstring .

$grep -l --exclude=*.py --exclude=*.cc --exclude=*.h -r searchstring /home/saju