Have a great Halloween :)

Posted on in Categories Humour last updated October 28, 2016

Here is a geeky joke for you:

I was dressed up as an UDP packet for the Halloween. I don’t think anyone got it, but I couldn’t tell.

Have a great Halloween :D

Find the oldest file in Unix or Linux file system

Posted on in Categories Link last updated October 28, 2016

So I wanted to know the oldest file on my Debian Linux box.

find / -type f -printf '%T+ %p\n' | sort | head -n 1
Here is an another example for /etc/
find /etc/ -type f -printf '%T+ %p\n' | sort | head -n 10

Find the top 10 oldest file in a directory tree on GNU/Linux
Find the top 10 oldest file in a directory tree on GNU/Linux

So find command finds all files in / and print it with a special format. The %T+ (in -printf) means file’s last modification date and time in separated by +, for example ‘2004-04-28+22:22:05.0’. This is a GNU extension and may not work on other BSD/find or any other version of find. The %p indicts the file name. The sort command sorted input and passed it to head to display the oldest file on my GNU/Linux system. The sort command sorted input and passed it to head to display the oldest file on my GNU/Linux system. Cool, eh?

(Credit: Ubuntu forums).

Forcefully mark down pfSense wan gateway as down

Posted on in Categories Link last updated October 28, 2016

From the article:

I have two internet connections (fiber and 4G LTE) configured in load balanced mode using pfSense FreeBSD based firewall. One of my wan connection is running out of bandwidth quota. How can I force and turn off this interface to save bandwidth until month end and enable it again from next billing cycle?

Read more…

virsh destroy && virsh undefine = Delete a guest VM on Linux KVM after creating it with virt-install

Posted on in Categories Link last updated October 28, 2016

If you created a KVM guest from the command line with first install. Say, after sometimes you do not need a guest VM. However, how do you I delete this KVM guest from the command line? The answer is simple:

virsh destroy VM_NAME && virsh undefine VM_NAME

Of course as usual stuff in IT may get complicated. See “how to delete a guest on Linux KVM for more info“.

Get 2x faster performance & 50% better memory consumption than PHP 5.6 by using PHP 7 on Debian and Ubuntu Linux

Posted on in Categories Link last updated October 28, 2016

So PHP 7 provides 2x faster performance and 50% better memory consumption than PHP version 5.6. How do you install PHP 7 on Ubuntu Linux version 14.04 LTS server? How do I install PHP 7 with PHP-FPM in along with Nginx web server or Lighttpd or Apache 2 server? How can I install PHP 7 on Debian 8.x or 7.x server? See

  1. How to install PHP 7 on Debian Linux 8.6/7.x [jessie/wheezy]
  2. How to install PHP 7 on Ubuntu Linux 14.04 LTS

Google AI is a xkcd fan too and makes sudo joke

Posted on in Categories Humour last updated October 22, 2016

The sudo command on Linux or Unix-like system allows authorized users user to run various admin commands. Everything after the word “sudo” on the command line executed as the admin user. Here is a joke from Google assistant AI:

google assitant sudo joke
Google assitant sudo joke

I believe this gag inspired by this xkcd comic:

Sandwich from xkcd comic
Sandwich from xkcd comic

Pretty smart, eh?

Dyn a cloud-based DNS service under DDoS attack and took down major sites such as Twitter/Reddit/Spotify/Paypal and others

Posted on in Categories Link last updated October 21, 2016

A massive DDoS (distributed denial-of-service) attack against a popular cloud-based DNS provider Dyn.COM took down major websites. The DYN.COM confirmed it on twitter:

Following sites are having issues due to DNS problems:

  1. Twitter
  2. SoundCloud
  3. Spotify
  4. Netflix
  5. Reddit
  6. Disqus
  7. PayPal
  8. Basecamp
  9. Business Insider
  10. CNN
  11. Esty
  12. Github
  13. Guardian.co.uk
  14. Imgur
  15. HBO Now
  16. Pinterest
  17. Recode
  18. The Verge
  19. Wired and more

You can verify NS with the following standard Unix command:
$ host -t ns twitter.com

twitter.com name server ns2.p34.dynect.net.
twitter.com name server ns1.p34.dynect.net.
twitter.com name server ns4.p34.dynect.net.
twitter.com name server ns3.p34.dynect.net.

From the official announcement:

This attack is mainly impacting US East and is impacting Managed DNS customers in this region. Our Engineers are continuing to work on mitigating this issue. Services have been restored to normal as of 13:20 UTC on 21/Oct/2016. But, I’m still seeing problems.

This DDoS attack may also be impacting Dyn Managed DNS advanced services with possible delays in monitoring. Our Engineers are continuing to work on mitigating this issue. — Oct 21, 2016 – 16:48 UTC

See the “DDoS Attack Against Dyn Managed DNS” update page for up to date information.

(Image credit)