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

Answers were Sorted based on User's Feedback



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

Answer / samrat biswal

Test is a condition evaluation command.The test command
evaluates the expression if the value is True,returns a
zero exit status; otherwise,a nonzero exit status is
returned.test also returns a nonzero exit status if there
are no arguments.

Is This Answer Correct ?    27 Yes 2 No

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

Answer / sumesh

test - check file types and compare values

Is This Answer Correct ?    27 Yes 6 No

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

Answer / sourisengupta

test - check file types and compare values

Is This Answer Correct ?    10 Yes 1 No

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

Answer / 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

More Unix Commands Interview Questions

which command is used to stop a running process in unix?

8 Answers  


how will you login one server's shell prompt to an another server?

5 Answers   Cosmic Infotech, Perot Systems,


Which command will you use to change the permissions on file?

7 Answers  


Assume that a file’s permissions give you read and write access. What operations can you perform on the file if it is in a directory which has “r”(read) only process? What operations can you perform on the file if it is in a directory which has “x”(execute) only access?

1 Answers  


How to set sticky bit, or it have any seperate directory to create sticky bit in sunfir servers. Please help me , i don't no the exact answer?

4 Answers   HCL, Wipro,






The rm command removes links to file. What does this mean? How then is a file deleted from the file system?

5 Answers  


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

0 Answers  


Differentiate cat command from more command.

0 Answers  


Where LOG fiels resides in AIX and pls tel me how to remove the log file

6 Answers   Vestas,


What is shrinking file system in AIX where it actually resides?

0 Answers  


How many unix commands are there?

0 Answers  


Are you in or at the office?

0 Answers  


Categories