Author: Surendra Anne

Why we can create only up to 4 primary partitions?

This is the question which pops in my mind that why not more than that 4 partitions here is the info how many partitions we can create actually in basic hard disk, we can create 4 partition(either primary or extended) we can create maximum 4 primary or 3 primary + 1 extended or 2 primary + 1 extended or 1 primary + 1 extended not more then that? why and what is the reason? The reason is because of a limitation of the MBR(Master Boot Record- the first sector of the harddisk.) The MBR is only 512bytes of size, it is needed to store the primary boot loader, and the partition table. Typically, the area reserved for partition table is only 64 bytes. And the partition table entry for one partition is 16 bytes. So, 16×4=64. The space is over. so we cant create more than this here are the sources for your reference http://kbase.redhat.com/faq/docs/DOC-1653 http://en.wikipedia.org/wiki/Master_boot_record Please visit https://www.linuxnix.com for more linux admin...

Read More

12 lsof Command examples in Linux/Unix

Today I came across ISOF command in one interview, the interviewer of this interview is a tricky guy and a great Linux/nix guru. He asked me many questions which I can’t answer, in that lsof command is one. This command impressed me, and this is one of the most powerful commands I ever come across till this point in Linux in respect of monitoring. So I did some research on this command and came across numerous examples for making network/system admin work bit more simple and meaning full. What is the lsof command? lsof is nothing but LiSt Open...

Read More

Crontab issues

For basic crontab configurations please click here Issue1:How to deny a user not to use his/her crontab to schedule his jobs there is seperate contab file for dening for user open and file and specify users name in that file #vi /etc/cron.deny Issue2:Display cron jobs for all users When migrating from one system to another it is good to know if there are cron jobs from other users on the system, here is how to display all of them: 1. for i in `cat /etc/passwd | cut -f 1 -d ‘:’`; do crontab -u $i -l; done; or for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done will loop over each user name listing out their crontab. The crontabs are owned by the respective users so you won’t be able to see another user’s crontab w/o being them or root. ISSUE3:Using crontab as alaram? I want a song played on every weekday at 5AM and i don’t want it in weekends here is the solution you requred mplayer or vlc player to do this which will support CLI execution. mplayer /music.mp3 & /dev/null& 00 05 * * 1-5 mplayer /music.mp3 & /dev/null& ISSUE4:I have written a shell script that works from console but does not work via crontab. This type of issues will occure in four situations 1. when there is some env variable issue 2....

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.