Solutionist's Blog

Tech | Health | Life | Travel

linux-unix-find-inode-of-a-file-command

The inode (index node) is a fundamental concept in the Linux and UNIX filesystem. Each object in the filesystem is represented by an inode. But what are the objects? Let us try to understand it in simple words. Each and every file under Linux (and UNIX) has following attributes: => File type (executable, block special etc) => […]

Install SNMP Centos / RHEL

nstalling SNMP daemon and tools: As root yum -y install net-snmp.i686 yum -y install net-snmp-utils Once these are installed start the snmp daemon: /etc/init.d/snmpd start chkconfig snmpd on   This is just the basic install but testing it : snmpwalk -v 1 -c public -O e 127.0.0.1 For production servers it is advisable to at least […]

how-do-i-find-out-what-shell-im-using

ps -p $$ So what is $ argument passed to -p option? Remember $ returns the PID (process identification number) of the current process, and the current process is your shell. So running a ps on that number displays a process status listing of your shell. In that listing you will find the name of […]

mdadm raid array lost after reboot

mdadm is a pain, since it doesn’t record the raid settings automatically, after you set everything up, you have to remember to save the mdadm.conf file. What a pain. Anyway, I forgot to do that, and on reboot, it hung my machine saying /dev/md0 was hosed. So here is how I recovered it. originally, my […]

convert-epoch-to-human-readable-date-and-vice-versa

What is epoch time? The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z). Literally speaking the epoch is Unix time 0 (midnight 1/1/1970), but ‘epoch’ is often used as a synonym for ‘Unix time’. Many Unix systems […]

php-tips-insert-href-link-in-a-php-code

If the link needs to be inside of the PHP you have two options. Option one is to end the PHP and then reopen it. Here is an example: <?php —– My PHP Code—- ?> <a href=”https://twitter.com/angela_bradley”>My Twitter</a> <?php —– My PHP Code—- ?> The other option is to print or echo the HTML code […]

ls-command-list-one-file-per-line

When I am busy with bash scripts , often need the filename only   with ls  command you can populate file names only in different line and you can take the first one with head   ls  -1    # 1 is the number not the letter l and get the first one by ls […]

html-tip-using-quotes-in-form-input-tags

In (X)HTML, attribute values should be enclosed by double or single quotes. But a common source of errors and confusion arises when those values themselves contain double or single quotes. This is especially common for form input fields, where the values might contain data obtained from a database or supplied previously by the user. Yes, […]

Secured By miniOrange