This article is all about simple utitlities and to answer the simple questions being asked commonly.
How to encrypt the password file?
You could use openssl to encrypt the password file. Here is the command provided by openssl to encrypt any file.
Now to read back,
The AES stands for advanced encryption standard. AES is advanced version than DES- Data Encryption Standard. It uses symmetric key algorithm, same key is used for both encryption and decryption.
Here 256 is the cipher key size. The key size must be the multiple of 32 bits. CBC is the algorithm. It stands for cipher block chaining.
It is worth to note that the bigger the block size is, it takes more number of rounds to encrypt the data that means it is more secure.
In the above example ‘ABC’ is the key. -e stands for encryption -d stands for decryption
How to delete the directory wih special names in linux?
For file deletions, one trick is to wildcard as much of the name as you can, and use the -i (interactive) option to decide what subset of the matches to delete, one by one. The rmdir command does not have that, but the recursive file removal will deal with directories. E.g.
What is -exec keyword in linux command?
‘-exec’ is an option specific to ‘find’ command. This is used to run other commands on the results returned from the ‘find’ command. So, exec doesn’t exist by its own, it can be combined only with find command.
Example
The above can be simplified to
Because ‘;’ is a valid command in shell linux. For e.g.
The above will display password.txt and then it will display password_enc.txt.
In our case, we don’t want to use ‘;’ by shell but to pass this to exec. So that’s why we are using escape character ‘'.
What is the utility in Windows to run DHCP Server for tftp purpose?
Here is the utility that I use in Windows10 to run my DHCP server.
What is the utility to see what IP addresses have been assigned by the DHCP Server
This utility nmap is very powerful and can be useful even to know what are the different IP addresses that are active.
How to grep for a text in the current directory but skip looking inside the directory Here -d skip means skip looking into the directory. Next -H means print the file names. Generally, the ‘-d skip’ is used with the find and exec.
How to increase the size of your virtual machine box? Many times, you will realise that your virtual machine box needs more space then you have allocated previously. I faced this issue while using yocto in my virtual machine running Ubuntu. Here is what I referred to increase the size of my virtual machine box -
Enlarge Virtual Machine disk space
This brings an end to this article. This article was just to touch some common commands and utilities to address common problems or tasks.