Find possible number of combinations
There are a, b techers and c,d doctors. Find the possible no. Of combinations that should not be repeated more than once?
If a program is terminated at the middle of execution in UNIX, what will happen to the program?
Nothing, actually. The OS will halt program execution, retrieve whatever resources the program was using, close whatever files it had open, and go back to doing everything else an OS does. If there is...
Write a shell script to join two csv text files based on value of some columns?
Which version of MySQL does not support stored procedure?
Stored procedures were introduced as a new feature in version 5.0.
Calculate and print the amount of money paid to each worker
A carpenter is paid a contract fee of $2000 for 3 days work. He hires 3 workers who work for 3 days at $75 a day. Calculate and print the amount of money paid to each worker, the total paid to each worker,the total paid to all workers and the amount the carpenter is lEFT with.
The amount paid to each worker is 75 per day, total paid for each worker is 225, total paid for all workers is 675, the money left for carpenter is 1325.
each worker get 3 times $75 for a total of $225 after three days
3 workers were hired so total of all workers would cost $675
the total contract was $2000 minus total labor cost $675 then $1325 remains to the carpenter.
A company gives out bonuses based on the amount of income generated by their sales representatives per month. Once the income generated is greater than or equal to $10,000 a bonus of 20% is given. If the income generated is greater than or equal to $8000 but less than $10,000 a bonus of 15% is given....
For sales representative gaining income above or equal to 10000 the bonus will be 2000 and above,if income range between 8000 to 10000 the bonus will be a range of 1200 to1500,if income equal to or above 5000 the bonus will be 150 and above
Let x be the income generated.
if x>=10,000 then bonus is 2000Rs therefore the income left is 8,000.
if x>=8,000 and <10,000 then bonus is 1,200Rs therefore the income left is 6,800.
if x>=5000 then bonus is 150Rs therefore the income left is 4,850.
Pipes are laid by an oil company
Pipes are laid by an oil company. If the company has to lay down 3km of pipes and each pipe is 25 meters long, calculate and print the number of pipes needed to cober the distance
120 pipes
120 pipes
How to take backup from solaris server?
boot -s
fsck /dev/rdks/c1t0d0s0
#ufsdump 0uf /dev/rmt/0 /dev/rdsk/c1t0d0s0
for restore
#ufsrestore /dev/rmt/0 /
The arp command is used to manage entries in the ARP cache. To display the entries in the ARP cache, use the a option,
How to migrate file systems from one server to another server in solaris?
If it's not a bootable file system, it's pretty straightforward.I'm assuming that by "migrate" you mean to completely remove a disk from one machine to put into another. If...
What is patching in solaris?
Patching is the process whereby you repair bugs or add new features in the system. Sun keeps a repository of patches based on the hardware and release level, and you should review that repositor...
How to decommission a solaris server?
That was a cool answer to unplug...What if that was a server with NIS/Storage connected.For a decom, you should first check for the active services on the server.something likeps -aef | grep -i ypfor ...
Unplug it.
How will you take database backup when there is no space in file system?
I would dump the database to a removable storage device.
Try to take dump on external device...
What motiVATes you to put forth your greatest effort? Describe a situation in which you did so.
Someone says it can't be done, that when i get motivated to do it at any cost.
You always get a sense of satisfaction that you could complete a task that was considered imposible by someone.
This would always make you confident
Never accept your failure in life.
Everything is possible when we put effort in that.
Explain srand() and rand() functions
rand() uses what is known as a "multiplicative congruential" method for generating pseudo-random numbers between 0 and 32767. (The exact maximum can be system dependent.)It will start ...
What does uid and gid signify?
To find a user's UID or GID in Unix, use the id command. To find a specific user's UID, at the Unix prompt, enter: id -u username Replace username with the appropriate user's username. To find ...
UID - User idGID - Group idWe can find out using sample command fire @ $ promoit "id" you will user id & group id.e. g step 1 : $ id ---> O/p get display immediately uid=232(vi...
Add not null column in a table
How we can add a notnull column in a table by using alter command (without using default command)?
You can add a NOT NULL column to a table. This means that a constant expression, and not a null value, is placed in the column when the column is added. This also ensures that, for all existing rows, ...
First add the column as NULL. Then populate the column with non-null data. Then modify the column to NOT NULL. You may need to set dboption "select into" to True.
How can we get information about log files in the database?
That is a vendor-specific question.In Sybase, you can get log file information as follows:prompt$ isql1> sp_help {database} 2> goThat will list the devices used by the database, including log de...
What is something you would like to avoid in your job ? Why?
I would like to avoid micro management and avoid receiving in and out info. The manager should emphasize on the strategic one while the employee may concentrate on how to achieve the ultimate goal with minor guidelines.
I would like to avoid being micro-managed. I know what I'm doing, and I know how to do it. The manager should just tell me what needs to be done, when it's needed, and the constraints. After that, just let me carry the ball and get out of my way.
What is rollback command in UNIX?
There is no "rollback" Unix command.The "lost+found" directory has no functionality analogous to the Windows "recycle bin". This directory is where the "fsck&q...
we don't have any rollback command in unix.
But we have one folder "lost+Find" in the root area.
This is like windows recycle bin. Size of this folder is set by UNIX administrator.
?
Yes, it is executed by the hardware like any other program. It controls itself.This is why you have the concept of a kernel, which would be the smallest possible piece of the operating system th...
Execution contexts can be of two types: thread/process context OR an Interrupt context. What this means is that to execute code, one has to be in a thread context or a an Interrupt context. OS code or...
What is the UNIX command to wait for a specified number of seconds before exit
How to delete a word from a file using shell scripting???
please note that my original answer ate the quote signs, which I'm going to try to make sure get through this time:sed 's/\<the\>//g'And in case that gets eaten also, it's a reve...
Be careful what you mean by the word, "word"A couple of people have answered with the "sed" command, which is good, but if you're looking for actually removing a "word&quo...
Using KSH while loop#!/bin/ksh
#Get the count of total number of arguments passed while executing this script
int i = $#; #total number of arguments passed#
names=$@; #list of actual arguments passed#
while [ ${i} -gt 0 ]
do
echo '${names[i]}';
i=`expr i - 1`;
done
exit 0;
$ cat rev2
i=$#
echo "$@" > file_1
while [ $i -gt 0 ]
do
cut -f $i -d" " file_1 >> file_2
i=`echo $i-1|bc`
done
echo `cat file_2`;
rm -f file_1 file_2;
$ sh rev2 A B C D E
E D C B A
What are the steps to take files from UNIX server to windows?
Most UNIX servers are configured not to use FTP or TELNET for security purposes, and if you use FTP it has limited number of data can be transfered on one transaction hence I preferred using another w...
If you can't get Samba, or you're not the Admin so you can't install it anyway, then use FTP, as it's almost guaranteed to be installed and running on both machines. The only han...
How do u open a read only file in UNIX?
Using vi editor. Read only files can be opened without any issues
Anything that opens a file, can open a read only file: cat, more, less, awk, pg, et all. The chmod command you put does not make a file read only, it makes it read/write for the user/owner.
What difference between cmp and diff commands?
Cmp - compares two files byte by byte and displays the first mismatchdiff - tells the changes to be made to make the files identical
diff is used primarily for files in text format, for example, source code. It is used to list all of the differences between two files.It is often used in source code control to get the changes ...
'cmp' and 'diff' both command are used to list the differences, the difference between both the command is that 'cmp' is used to find the difference between files whereas '...
24 number of possibilities
There are 15 possible combination
4C1+ 4C2 + 4C3+ 4C4= 15
One value missed is ACD in the above given 14 combinations.