Posted on January 16, 2007 by awmanoj
A simple question: When do we use ‘>’ or ‘<’ and when do we use ‘|’ (i.e. pipe) for redirection of I/O ?
A simpler answer:
When we have to redirect to/from a file then ‘>’ or ‘<’ is used and when we have to redirect to/from a program then ‘|’ is used.
Filed under: Uncategorized | Leave a Comment »
Posted on January 9, 2007 by awmanoj
An interrupt is an asynchronous event caused by devices to the kernel which must be processed urgently and in system context. Since this is not handled in process context, this cannot access u area and other process specific data structures. Only penalty that the interrupted process makes is that interrupt handling uses the time slice [...]
Filed under: linux, technical | Leave a Comment »
Posted on January 9, 2007 by awmanoj
There are several ways to change the real or effective UID/GID of a process: -
* exec system call, when used to execute a program installed in suid (set uid) mode, changes the effective UID of the process to the effective UID of the owner of the program file. This the trick used by passwd program. [...]
Filed under: linux | Leave a Comment »
Posted on January 9, 2007 by awmanoj
Reading the book by Uresh Vahalia, Unix Internals, I could understand exactly what is the concept behind real and effective UID and GID. I immediately thought of blogging it for reference.
The effective UID and effective GID affect file creation and access. During file creation, the kernel sets the owner attributes of the file to the [...]
Filed under: linux, technical | Leave a Comment »
Posted on January 9, 2007 by awmanoj
If you are also fed up of exporting DISPLAY manually everytime you need to use gvim or anything else requiring ‘X’ then you will get a relief reading this post. you can use -X option
ssh -X [IP | Host]
If you use ssh -X, ssh will tunnel your X connection for you and automatically set [...]
Filed under: linux, technical | Leave a Comment »
Posted on January 8, 2007 by awmanoj
Going through an article on stock investments and the risks involved I got through this handy rule :-
If you want to know how longĀ it will take to double your money at any rate of return, simply apply the rule of 72, that is, divide 72 by the expected rate of return and the result is [...]
Filed under: business, investing | Leave a Comment »
Posted on January 8, 2007 by awmanoj
The article that I just read discusses briefly about the calculation of net worth and why is it useful.
Net worth = (Total Assets) – (Total Liabilities)
Assets include -
* current account and savings
* capital in stocks and mutual funds
* debentures
* life insurance surrender cash value
* home, real estate investments
* cars/jewellery/furniture etc.
Liabilities include -
* mortgages
* car [...]
Filed under: investing | Leave a Comment »
Posted on January 2, 2007 by awmanoj
From the confusions in Expressions in C, as to what is legal and defined, and what is not, I read following from the C FAQs.
A sequence point is a point in time at which the dust has settled and all side effects which have been seen so far are guaranteed to be complete. [...]
Filed under: Programming, technical | 1 Comment »
Posted on January 2, 2007 by awmanoj
I came across the following C problem this morning. This problems are so similar in looks that i felt a deja vu. I used to think earlier that these problems are just a result of obscure thinking or for the satisfaction of an interviewer’s ego but now my view is different – they also prove [...]
Filed under: Programming, technical | Leave a Comment »