Snippets

wget save with different file name and special characters in url

To save an URL into a different file name the “-O” option is the best way to go. If you have special characters like ? or & in your URL enclose the URL in double quotes.

This is how it should look:

SSL source without checking the certificate

If you have a ssl source and do not want to have the certificate checked:

Linux console whereis VS which

In a recent incident where I was looking for Java on the console I noticed a difference between whereis and which. This is the short version:

whereis
searches the standard Linix (Unix) locations for a specified command

which
which returns the pathnames of the files which would be executed in the current environment

I prefer which because I am more interested in if a binary can be accessed in the current environment.

Using mail from command line

Simple mail directly from command line

more

Install node.js on Linux Mint 18 / Ubuntu 16.04 LTS

At the time of writing node.js LTS is in version 8.9. Therefore installation of version 8.x on Linux Mint is shown

 

Create and import MySQL / MariaDB dump

Create a MySQL / MariaDB dump on command line

Import a dump into MySQL / MariaDB

more

Get parent directory path in Java