what is the use of "test" command in unix?

Answer Posted / manikantan t s

test is very useful on condition checking.

following are the most used options

-r,-w,-x,-f,-d,-eq,-gt,-ge,-lt,-le,-ne,=,!=,-z

Is This Answer Correct ?    11 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the search command in unix?

609


When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include # include int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:

1768


What is $0 bash?

653


What happens when we execute a unix command?

602


How do I search for text in vi?

590






Can you enlist some commonly used network commands?

604


Name the unix command to find how many days the server has been up.

612


What are the general commands in using unix os for a beginner?

583


What is grep r?

596


What is unix command line?

614


Who invented grep?

657


Does cp command overwrite files?

628


What are reported commands?

570


What command will change your prompt to myprompt?

710


How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?

765