Ben Chuanlong Du's Blog

It is never too late to learn.

Sort top by CPU or Memory Usage

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

By default the result of the top command is sorted by CPU usage on Linux. The table below list options to sort the result of the top command by different criterias …

Tips on Kerberos

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Installation

Ubuntu

apt-get install krb5-user

CentOS

yum install -y ntp yum install krb5-workstation krb5-libs krb5-auth-dialog

Issues

kinit: Permission denied while initializing Kerberos 5 library

It is likely due to the fact …

Hard Link, Symbolic Link and Bind Mount

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

https://unix.stackexchange.com/questions/198590/what-is-a-bind-mount

Change Modified Time of Files

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Change the modifiled timestamp of a file to the specified timestamp.

    touch -m -t 201512180130.09 some_file
    
  2. Change the modified timestamp of a file to the current time.

    touch -m some_file …

Configure Proxy for Apt

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Add the following lines into the file /etc/apt/apt.conf, where proxy_server is the address/ip of the server and port is the port of the proxy service.

Acquire::http …