[HOW TO] What is the interrupt key for Linux command?

If you are Linux user, some times you get the "Waiting for data ... (interrupt to abort)" message on Linux terminal.

What is the interrupt? nothing seems to work, you can not continue. Also you can kill the terminal which is a pain. Or simplicity Ctrl + C to fine.

I don't like it, however I also don't how to kill it? 

Google around and I see the solution: Ctrl + shift + c to solve. Unbelievable!


Thank you for reading this article, please a comment if you are interested.

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success

Updating disk free size without rebooting the host | How to clean /tmp

I'm having the issues with /tmp/ directory, it is full and Now I must to release to zero. Luckily I have done.

When a file is removed/ deleted/ unlinked, if it is still held open by any process then only the directory entry for the file is erased, not the file's data. When the file is completely closed by all process the data is returned to the free space pool. It's a feature since you can have anonymous files this way.

To see if you have any open deleted file on a filesystem, run one of these commands, where /mount/point is the mount point.

lsof +L1 /mount/point


Thank you for reading this article, please a comment if you are interested.

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success

[HOW TO] can I stop being prompted to unlock the 'default' keyring on boot?

Use this if you have forgotten the old password and is ok to delete items in the old keyring, but want to safeguard new keyring with matching password.
For Ubuntu 14.04, I used the following.
Remove old keyring:
cd .local/share/keyrings/
rm *.keyring
Restart the system to have the new keyring created:
sudo shutdown -r now
Verify the new keyring exists:
cd .local/share/keyrings/
ls -ltr *.keyring

[HOW TO] force nginx to send specific Content-Type when using alias

hi,

Long time no see,

I want to force nginx to send specific Content-Type for one paragraph. How to?

Last time, I can not change it, when I curl -I, it shows Content-Type: application/octet-stream;

And I want it to be:
Content-Tyoe: application/json;

Finally, I set it as:

  location /me/api/versions {
        default_type application/json;
        alias /home/www/html/me/api/versions.json;
  }


-Tien

Thank you for reading this article, please a comment if you are interested.

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success

[HOW TO] update CentOS server's time from an standard server time

Today I get the alert from monitoring system about time server is in-correct.
Is there a mechanism whereby I can update the server with the time from a specific time server?

Yes, I do.

You only follow below instruction:

yum install ntp
chkconfig ntpd on
ntpdate pool.ntp.org
/etc/init.d/ntpd start
My server is running with CentOS.

Thank you for reading this article, please a comment if you are interested.

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success