[Linux]: To set JAVA/HADOOP env variables permenently
[root @ dbversity /tmp]# java -version java version “1.8.0_05” Java(TM) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode) [root @ dbversity /tmp] [root @ dbversity /tmp]# which java /usr/java/jdk1.8.0_05/bin/java Otherway to know the installed…
[Linux]: How do I remove ‘Control M’ i.e., (^M) characters from a file
To create a file with “Control M” (^M) characters – you can type Ctrl+V,Ctrl+M from keyboard through vi editor in a linux file. And to view “Control M” characters in a file, you can use “cat -v filename” or “cat…
[Linux]: Bulk user creation script
[root@myhostname ~]# cat usercreation_script.sh #!/bin/bash # shell script to add a users to Linux server ## checking for highest volume partition on the server to create user’s home directory partition=`df -h | awk {‘print $4 ” ” $6 ‘} |…
YCSB workloads evaluation for MongoDB as complete In-Memory
Please find the procedure followed to enable the complete In-memory MongoDB set-up. Step1 :- To mount a RAM partition with 4GB mount -t tmpfs tmpfs /mnt -o size=4096m [root@my-host-name bin]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/rootvg-lv_root…
SSH issues with Incomplete SOE Build VMs
Do you have issues with you SSH in your lab/test VMs which has no proper builds and thus it’s effecting SSH Tectia functionality. No issues, below works for me – please have a try. Not sure how far this is…
How to add script in Linux start-up
To add the scripts in start-up, we can use any of the one following command. In the below scenario, say you wanted add mongod start/stop/restart script to Linux ( reboot/start-up) [root@12d4-dl585-03 init.d]# chkconfig –add mongod [root@12d4-dl585-03 init.d]# (OR) Add a…
yum install “package” is Not working ?!!
How do we copy ‘Yum Repositories’ from one server to another :- Imagine, you have java package not available in your SERVER#1 and you know it is available with SERVER#2. Then you can copy the require yum repositories configs from…
Linux’s AWK
Linux: Adding Numbers in a File Here’s a Linux command to add numbers inside a file: [root@myserver misc]# cat num.test 1 2 3 4 5 This is a sample file with only 5 lines. Think of a file with millions…
Linux sorting, crontab & concat
Linux: Sorting a File Here’s simple ‘sort’ command that will remove the duplicate entry from any file and sort in ascending order:Consider a file with few numbers: [root@myhost tmp]# cat testSort.txt 23 4 56 001 34 3 To sort it:…
Remote file transfer using Rsync
While we usually deal with huge data, we come across situations where we need to copy such data from one server/host to a remote host. One of the useful command is ‘rsync‘, which is faster than the traditional scp command!…