VIKHOST Tech Blog
Useful Technical Articles, Notes and Instructions.
How to Clear BASH History in Linux, Centos, Debian and Ubuntu

How to Clear BASH History in Linux, Centos, Debian and Ubuntu

How to Clear BASH History in Linux, Centos, Debian and Ubuntu — If you don’t want to save history in Bash, since the commands may contain data such as passwords. This article will help keep Bash history in check. How to completely delete the Bash history: -c - Clear history file -w - add commands of the current session to the history file # history –cw How to remove a specific line from the Bash history: -d - Delete the line with the specified number from the history # history -dw 352 How to clear command history of current session: ...
Read more
How To Clear or Remove Linux Logins History

How To Clear or Remove Linux Logins History

How To Clear or Remove Linux Logins History — On Linux systems, there are three standard commands that show information about the most recently connected users: last, lastb and lastlog. The output of these commands includes: login, time of last connection , IP address, port, etc. To preserve anonymity, it is necessary to clear the history of recent connections.
Command Log Description last /var/log/wtmp Lists successful login/logout history lastb /var/log/btmp History of failed login attempts lastlog var/log/lastlog List of the last connected users To remove all the information about the last logged in users, you need to clear the logs: ...
Read more
How to Find the Largest Files in Linux

How to Find the Largest Files in Linux

How to Find the Largest Files in Linux — The search for large files is especially relevant when the disk runs out of space and you have to look for files to delete. The best way to find all the largest files on a Linux server is to use the command line. You can easily get a list of the largest files using a combination of several simple commands. How to Find the Largest Files in Linux: Sometimes you can search for large files, especially large log files that can quickly fill your server, with the following command you can ...
Read more
MySQL - Create new user | VIKHOST

MySQL Server-Create New User and Grant Permissions

Create New User and Grant Permissions to MySQL database server In this article, we will explain how to create a new user in MySQL, and grant permissions to that user in MySQL. Creating a new user in MySQL database and granting permissions is an easy task if you follow this tutorial carefully. 1. Log in to MySQL To log in to MySQL system uses the following command: mysql -u root –p By executing this command we tell the MySQL client to log us in with the root user and to prompt us for the user’s password. 2. Creating a new ...
Read more