What a pid is using port.sh

Этот небольшой скрипт позволит узнать, какой PID занял порт на сервере Solaris:

#!/bin/ksh
#------
line='---------------------------------------------'
pids=$(/usr/bin/ps -ef | sed 1d | awk '{print $2}')
#------
if [ $# -eq 0 ]; then
read ans?"Enter port you would like to know pid for: "
else
ans=$1
fi
#------
for f in $pids
do
/usr/proc/bin/pfiles $f 2>/dev/null | /usr/xpg4/bin/grep -q "port: $ans"
if [ $? -eq 0 ]; then
echo $line
echo "Port: $ans is being used by PID:\c"
/usr/bin/ps -ef -o pid -o args | egrep -v "grep|pfiles" | grep $f
fi
done

Для RH проще
netstat -nlp | grep :1521
Вывод
tcp 0 0 :::1521 :::* LISTEN 32548/tnslsnr

What is RH version?

What is RH version?
cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.8 (Santiago)

ln -s где_уже_что_то_находится по_какому_пути_линк_по_которому_нужен_доступ
ln -s /oracle/app/oracle/product/grid_12.2 /oracle/app/oracle/