Lets say you have been working on a project that is tracked by Git and suddenly realized that you did something wrong. You have some not yet committed changes and you want to undo everything. In particular you want to delete all newly created files and folders and restore all modified or deleted. In short […]
Let say you have a file that is tracked by Git and has a commit history. Some day you will want to look back to see what has happened with this file. The most basic and powerful tool to do this is the git log command. Using the different options, it can show the commit […]
A symbolic link, also known as a symlink or a soft link, is a special kind of file (entry) that points to the actual file or directory on a disk (like a shortcut in Windows). Symbolic links are used all the time to link libraries and often used to link files and folders on mounted […]
By default, the SSH client verifies the identity of the host to which it connects. If the remote host key is unknown to your SSH client, you would be asked to accept it by typing “yes” or “no”. This could cause a trouble when running from script that automatically connects to a remote host over […]
You may notice that in your routing table you have a route 169.254.0.0/16. It is so called ZEROCONF route. Every time the system boots, the ZEROCONF route (169.254.0.0/16) is enabled and added to the routing table. And it is time to get rid of it.
If you have made some changes to the code and you would like to share these changes with others – the best way is to provide them as a patch file. diff is the Linux command line tool that is used for creating patches (sometimes called diffs) and requires that you have two copies of […]
Files in Linux have 3 types of timestamps: atime (access), mtime (modify) and ctime (change). Someday you may have a situation when you would like to fake a timestamps of some file. atime and mtime timestamps can be easily changed using touch command, but there is no a standard way to set a different ctime […]
From the following article you will learn how to clear or remove the last login information on a Linux server from the command line. On the Linux systems there are three standard commands that show the information about last logged in users: last, lastb, and lastlog.
The Linux administrators that work with web hosting know how is it important to keep correct character encoding of the html documents. From the following article you’ll learn how to check a file’s encoding from the command line in Linux. You will also find the best solution to convert text files between different charsets. I’ll […]
When you are dealing with lots of different SSL Certificates, it is quite easy to forget which certificate goes with which Private Key. Or, for example, which CSR has been generated using which Private Key. From the Linux command line, you can easily check whether an SSL Certificate or a CSR match a Private Key […]