MacOS: Could not read files copied from external drive to your Mac

While you have successfully copied the data from your external devices particularly from NTFS file system to your MacOS's file system (APFS), you still would need to struggle to access those files later for some reason. Or in certain cases being a super user you may be able to access those files, but not your applications. Here the three simple steps to fix the issue. Prerequisite: Step 1: Install...

MySQL Table Synchronization

MySQL Table Synchronization ======================= Step: 1 Download the below package and sample script for table sysnchronization. # cd /opt # wget  https://static.spiceworks.com/images/how_to_steps/0000/3025/mysql-table-sync-0.9.3.tar.gz # wget https://static.spiceworks.com/images/how_to_steps/0000/3026/syncTables.sh Step: 2 Extract above package # tar xzvf mysql-table-sync-0.9.3.tar.gz #...

Bash: Advanced command line arguments

Bash: Advanced command line arguments Slicing down bash arguments as you want echo "arg length:" $# for i in "${@:1:1}" do echo "$i" done for i in "${@:1}" do echo "$i" done echo " This is the last arg of cmd-args: " echo "${@:$#:1}" echo " args but not last one" #shift for i in "${@:1:$(expr $# - 1 )}" do echo "$i" done # Suggestion by Kevin: https://plus.google.com/106297454560345286689 #...

How to: Oracle Sqlplus important flags for spool a table into CSV

How to: Oracle Sqlplus important flags for spool a table into CSV Hello, If you are trying to export a large table from a database via SQL Developer, it will take a lot of time. So to reduce the time and effort and you can log into or connect to remote Oracle DB via SQLPlus. And while importing the data, to get proper structuring to your data below flags will help you. set colsep...

How to check I/O throughput and latency in Linux servers

How to check I/O throughput and latency in Linux servers Hello, Recently our servers started behaving really strange. Suddenly they became very slow. Even I try with small commands such as ls,top I have got the output after a while but not with regular response. After analyzing running process and CPU utilization I went looking for I/O speed and that is where we found the issue. So...

How to check telnet for multiple IP at a time using Bash

How to check telnet for multiple IP at a time using Bash Hello, If you have multiple number of server and you would like check whether a particlur port open or not, generally you use telnet as below [root@localhost ~]# telnet 192.168.56.102 22 Trying 192.168.56.102... Connected to 192.168.56.102. Escape character is '^]'. SSH-2.0-OpenSSH_7.5 ^] telnet> q Connection closed. [root@localhost...

How to check what SSL Ciphers are supported by your JVM

How to check what SSL Ciphers are supported by your JVM Hello Team, If you ever wondered what are the SSL Ciphers supported by your appliaction which running on particular JVM, then you can find it with below program. Note: Make sure you are switched into user who is allowed to start your application. Go to /tmp directory and createa file named as Ciphers.java import java.util.Iterator; import...

How to: Oracle Sqlplus important flags for spool a table into CSV

How to: Oracle Sqlplus important flags for spool a table into CSV Hello, If you are trying to export a large table from a database via SQL Developer, it will take a lot of time. So to reduce the time and effort and you can log into or connect to remote Oracle DB via SQLPlus. And while importing the data, to get proper structuring to your data below flags will help you. set colsep...

How to check TLS version support for a remote SSL URL by using openssl ?

How to check TLS version support for a remote SSL URL by using openssl ? As recently many service providers are disabling the weak ciphers, TLSv1.2 becoming most trusted cipher at this moment compaing with TLSv1, TLSv1.1. If you want to know more about these protocols, please refer https://www.wolfssl.com/differences-between-ssl-and-tls-protocol-versions/ So if you are using services...

How to get agent or nodes list from Puppet master

If you are trying to list all the nodes connected to your puppet server, then you can use below command. # puppet cert list --all For example, [root@puppetserver production]# puppet cert list --all + "debian.mylabserver.com" (SHA256) 63:17:8A:7D:E1:94:D4:BA:F8:7E:E5:09:4A:D4:A4:67:0A:62:8C:EF:AE:F3:4B:35:33:48:8C:46:55:90:0C:F6 + "puppetserver.mylabserver.com" (SHA256) D5:9F:9C:10:22:92:53:7C:29:F4:A6:E6:84:A2:53:FE:74:B6:9F:87:B0:55:65:A4:D4:5F:B9:CD:09:71:0E:FA...

BASH: grep - hide filenames without matching patterns

Hello , If you want to get count for pattern matchings in a file then you would use " -c" flag like we all do. It will print matching files with count in the ending and non matching files with count as :0 in the ending. If you are doing this for 100 files your screen will flood with matching and non-matching details. To get clear picture of only matching, if you can pipe( | ) your result into grep...

Bash: Connect to Oracle DB

Even you dont have tnsora defined for your database , you can still connect to database using below shell script. LOGIN_DATA="user/password@' (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=XXX.XXX.XXX.XXX)(PORT=1521)) (CONNECT_DATA=(SID=SID)))'" CONNECT=`sqlplus -S ${LOGIN_DATA} <<- span="">EOF SET ECHO OFF; select count(*) from table; EOF` echo "$CONNECT...

Firewalld: Add Puppet master ports to firewalld in CentOS7.

1. Find out what are your server's active zones. [root@vihitaatma ~]# firewall-cmd --get-active-zones public   interfaces: ens192 [root@vihitaatma ~]# 2 Puppet has different ports for different services. 3000: Web based installer  8140: Communication port between Puppet Master & Agent.  61613: Used by MCollective for orachestration requests by Puppet agents 443: Puppet...

SQL: Give grants to all tables in a schema

Use this procedure and just execute it as normal SQL query BEGIN    FOR R IN (SELECT owner, table_name FROM all_tables WHERE owner='Schema_name 1') LOOP       EXECUTE IMMEDIATE 'grant select,insert,update,delete on '||R.owner||'.'||R.table_name||' to <>';    END LOOP; END; Schema Name 1 : This is like to which schema you needed grants. Schema name 2: This...