jeltsch's blog

How to start openvpn or ssh server under Ubuntu 16.04 and 18.04

OpenVPN
sudo systemctl start openvpn@client
The "client" is derived from the configuration file name (/etc/openvpn/client.conf). If your configuration file is server.conf, the command needs to be
sudo systemctl start openvpn@server
When you want the service to start up automatically during system boot, you issue:
sudo systemctl enable openvpn@server
Templated versus non-templated services

Batch renaming files on the command line

The default command line application for batch renaming files in Ubuntu 16.04 is called "rename":
rename 's/tk98i_/wt_tk98_/' *.tif
It uses Perl regular expressions with and the s/old/new/ syntax. The example above renames all files with the .tif extensions and replaces the th98i_ expression with wt_tk98_.
Here are some more examples: http://tips.webdesign10.com/how-to-bulk-rename-files-in-linux-in-the-ter...

ffmpeg

Trimming an avi file:
ffmpeg -i Die_Sendung_mit_der_Maus_16.06.19_09-30_ard_30_TVOON_DE.mpg.HQ.avi -vcodec copy -acodec copy -ss 00:06:04 -t 00:29:32 output.avi

ss is the start time and t is the duration (not the end time)

webm to mp3 conversion:
ffmpeg -i La_robe_de_soie.webm -vn -ab 128k -ar 44100 -y "La_robe_de_soie.mp3"

Concatenate two videos:
ffmpeg -f concat -safe 0 -i list.txt -c copy /tmp/output.avi

list.txt:
file 'video1.avi'
file 'video2.avi'

Pages