Sunday 27 May 2018

compgen Command on Linux

This command will list all available commands on Linux.

To list all the commands 

manivel ~ # compgen -c 

If you want to count the total available commands on linux,  type below command

manivel ~ # compgen -c | wc -l
4031

To list all the bash aliases 

manivel ~ # compgen -a 

To list all the bash built-ins

manivel ~ # compgen -b 

To list all the keywords

manivel ~ # compgen -k 

To list all the bash functions

manivel ~ # compgen -A function


Sunday 20 May 2018

bind(): No such file or directory [core/socket.c line 230]

I configured uwsgi with nginx and got the following error


 


Solution :


Later i found socket parameter of uwsgi doesn't exists. So, I have created the following folder as per the uwsgi configuration.



[root@localhost]# mkdir /var/run/uwsgi


After i restart the uwsgi and it is working fine.


(venv)[root@localhost ]# uwsgi --ini uwsgi.ini





Friday 18 May 2018

Format USB Drive in Linux


Insert usb drive into your laptop or machine and follow the steps to format

Step1  : Identify the usb drive

manivel ~ # df -h

Step2 : umount the usb drive

manivel ~ # umount /dev/sdb

Step3: Recheck the usb drive whether umount or not

manivel ~ # df -h | grep /dev/sdb

Step4: Format the usb drive with vfat filesystem

manivel ~ # mkfs.vfat -n "LAB-9" -I /dev/sdb

-n ----> Volume name
-I ---> device type

In this way you can format the usb drive with different file system methods.

Step5:  Mount the usb drive


manivel ~ # mount /dev/sdb /mnt/manivel_pendrive/


This is the image overall steps covered.