Category Archives: Debian

Tricks in command line

Serve current directory tree at http://$HOSTNAME:8000/ $ python -m SimpleHTTPServer Currently mounted filesystems in nice layout $ mount | column -t Get your external IP address / host / user agent / port from http://ifconfig.me/ $ curl ifconfig.meor$ curl ifconfig.me/ip$ curl ifconfig.me/host$ curl ifconfig.me/ua$ curl ifconfig.me/port Execute a command at one, given time $ echo… Read More »

Save file to your Nextcloud from bash

Sometimes you need to upload from command line to you Nextcloud storage. You can do it with a simple curl command. At first you have to create a shared directory in your Nextcloud with “Allow upload and editing” share option. You will get a share link for example: https://nextcloud.myserver.com/index.php/s/gz8BS7mtxGbwkQB The string “gz8BS7mtxGbwkQB” will be used… Read More »

Useful Bash aliases

An alias is nothing but the shortcut to command or group of commands. It allows to use options and filenames. You can add your own user-defined aliases to ~/.bashrc file. You can cut down typing time with these aliases, work smartly, and increase productivity at the command prompt. More about aliases Use alias command without… Read More »

MySQL benchmark on Debian server

Prerequisites installed sysbench package installed MySQL server root access to MySQL server (for creating and dropping database) Create test database root@server:~# mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2544 Server version: 5.6.28-1 (Debian) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All… Read More »

How to run a command or script after running apt-get command on a Debian or Ubuntu Linux

How do I run custom command after ‘apt-get upgrade‘ or ‘apt-get dist-upgrade‘ on a Debian or Ubuntu Linux based system? How do I hook a script to apt-get command on my Ubuntu Linux server? You can configure the apt-get command using /etc/apt/apt.conf file or place configuration in a special directory at /etc/apt/apt.conf.d/. More in nixCraft.… Read More »