What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-08-26 11:06:03
free port in linux
netstat -tulnap // list all ports and processes netstat -anp|grep "port_number" // show port details sudo fuser -k Port_Number/tcp // free the port needed # or lsof -n -i :'port-number' | grep LISTEN // get port details # sampl... Add solution -
Shell/Bash 2021-08-26 11:03:02
linux which process is using a port
$ netstat -ltnp | grep -w ':80' Add solution -
Shell/Bash 2021-08-26 11:01:03
wget files matching pattern
# Getting http://some/site/*my_pattern* SITE="http://some/site/" PATTERN="my_pattern" wget -nv -O- $SITE | grep $PATTERN | awk -v pat=$PATTERN -F '"' '{ for (i=1; i<=NF; ++i) { if ($i ~ pat) print $i } }' | while ... Add solution -
-
Shell/Bash 2021-08-26 10:55:02
ubuntu check ssh login log
grep 'sshd' /var/log/auth.log Add solution -
Shell/Bash 2021-08-26 10:54:03
ubuntu check how many cores
cat /proc/cpuinfo | grep processor | wc -l Add solution -
Shell/Bash 2021-08-26 10:53:02
check start date of process id linux
ls -ltrh /proc | grep username Add solution