Archive for Linux

How to take MySql dump (backups)~ Preserve bash history in multiple terminals~ How to take mysql dump~ Run one process (or more) into tmux~ Check DNS nameservers information about host addresses~ How to purge the cache of a page~ Checking the Validity Date of an SSL Certificate~ How to restart network interface~ How can I monitor the memory usage?~ Default max heap size~ How to convert the ^M linebreak to ‘normal’ linebreak in a file opened in vim?~ find difference between two text files with one item per line~ how to extract the first and the last x lines of a big file~ How to remove the ^M return character on Linux~ Find difference between two text files with one item per line~ How to check git changes~ How to list all users in ubuntu/linux~ Bash: Match a word in a string and return the word preceding it~ Delete all files in a folder which don’t match file extensions~ Check space in a disk~ wget – how to mirror only a section of a website~ Move files older than 30 days in current folder to~ How to generate a secure random password~ How to retrieve Perforce password.~ How to get your online secret key directly to your terminal without saving it.~ The request to Suspend this virtual machine failed because the corresponding VMware Tools script did not run successfully.~ BASH Rename all file in a directory~ How can I edit the welcome message when ssh start?~ Find text including subdirectories in ubuntu~ Install the JDK on Ubuntu server~ Copy files with progress bar on terminal~ Decrypt file encrypted with old/primary master key~ How to remove the private master key from your laptop.~ my minimum dot bashrc file~ Add and append text to a file~ Network Connections and network protocol statistics – netstat~ Bash: TAB completion to be case-insensitive~ Get a list of all the cron jobs on a Debian based system~ Why use 64bit?~ Fork bomb~ Sniffing network packages – tcpdump~ Update the timezone~ How to install Java 6 on Ubuntu 12.04~ Search for a specific string inside a directory matching the files’ name~ Re-build the keyboard setting~ Size of a directory~ New IP~ Search for a file in a specific folder matching a string~ Resolve UTF-8 issue in Linux Console~ Untar a file/folder~ Linux basic command: cat, replace, redirect stdout to a file~ SSH Public Key Based Authentication — Howto~
How to take MySql dump (backups)

How to take MySql dump (backups)

mysqldump –add-drop-table -a -u username -p database | gzip > prod-db-dump.sql.gz Note: The password is not passed to the command line, but it will asked at the prompt

Continue reading →

Preserve bash history in multiple terminals

Preserve bash history in multiple terminals

dd the following to ~/.bashrc # Avoid duplicates export HISTCONTROL=ignoredups:erasedups # When the shell exits, append to the history file instead of overwriting it shopt -s histappend # After each command, append to the history file and reread it export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history…

Continue reading →

How to take mysql dump

How to take mysql dump

mysqldump –add-drop-table -a -u <user> -p <dbname> | gzip > db-dump.sql.gz

Continue reading →

Run one process (or more) into tmux

Run one process (or more) into tmux

Let’s say you need to run a process like a lightweight private npm proxy registry such as Verdaccio and you do not want to use a Docker container. You can run a simple command as noup verdaccio & . It might happen that the process…

Continue reading →

Check DNS nameservers information about host addresses

Check DNS nameservers information about host addresses

You might want to find information about a particular domain and check where it is hosted. i.e.: You could have a domain hosted by Godaddy and have your MX record hosted somewhere else. In this case with Dig command you can check where the DNS…

Continue reading →

How to purge the cache of a page

How to purge the cache of a page

I get sometimes requests from customers to invalidate the cache for a particular webpage only. From inside the server the PURGE request is allowed so: curl –insecure -I -H "Host:www.racoonlab.com" -X PURGE http://localhost/whatever/whatever/whatever/ Another option is to use telnet: Since telnet commands are not meant…

Continue reading →

Checking the Validity Date of an SSL Certificate

Checking the Validity Date of an SSL Certificate

echo | openssl s_client -connect maven.escenic.com:443 2>/dev/null | openssl x509 -noout -dates

Continue reading →

How to restart network interface

How to restart network interface

ifdown eth0 ifup eth0

Continue reading →

How can I monitor the memory usage?

How can I monitor the memory usage?

watch -n 5 free -m

Continue reading →

Default max heap size

Default max heap size

If you need to get the default max heap size used by your machine: java -XX:+PrintFlagsFinal -version 2>&1 | grep MaxHeapSize

Continue reading →

Page 1 of 6 1 2 3 4 5 ... Last →