netstat
Use this command to list all listening IPV4 ports with ip and port numbers:
$ netstat -anl -f inet
- Read more about netstat
- Log in to post comments
Use this command to list all listening IPV4 ports with ip and port numbers:
$ netstat -anl -f inet
$ tail -f file | grep --line-buffered my_pattern
Save this script into an sh file:
#!/usr/bin/env bash DBNAME=$1 INFILE=$2 SED_FILTER="/^-- Current Database: \`$DBNAME\`/,/^-- Current Database: /p" sed -n "$SED_FILTER" $INFILE > $DBNAME.sql echo "Dump is ready: $DBNAME.sql" exit 0
Run as :
$ sh script_name dbname full_dump_file
If you want to avoid problems during foreign key imports, then insert this line into the newly generated file after the USE <DBNAME>; statement:
SET FOREIGN_KEY_CHECKS=0;
Put this line into your ~/.bashrc:
case "$TERM" in rxvt|rxvt-unicode|xterm|vt100) export PS1="\[\e[1;32m\]\u@\[\e[1;33m\]\h\[\e[00m\]:\[\e[0;37m\]\w\[\e[00m\] \$ " export PROMPT_COMMAND='echo -ne "\e]0;${USER}@${HOSTNAME}: ${PWD}\007"' ;; esac
Put this line into your ~/.shrc:
export PS1="$(echo -e "\033[31m$(whoami)\033[00m@$(hostname -s): \$PWD $") "
Change coloring as you wish by tuning \e[31m and \e[00m parts.
For color codes and further information see the link attached.
This command synchronizes all current setting with zone file, and also removes the journal (jnl) file:
# rndc sync -clean
mysql> select constraint_name, table_name from information_schema.key_column_usage where referenced_table_name = '<TABLE_NAME>';