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

How can i know my Filesystem and its current usage in my prod UNIX system?

4 Answers   HCL, IBM,


Who command in unix?

0 Answers  


Is there any command in Unix, other than:ls, to list the files in a directory? The answer will be highly appreciated...

27 Answers   CGI,


distinguish between user mode and kernel mode?

6 Answers   Infosys,


What is grep and sed command?

1 Answers  


What is FIND, GREP and SED ? Could you please give me the difference between all the three? Where we use this commnands?

6 Answers   Deloitte, Polaris,


Write a command to find all of the files which have been accessed within the last 30 days.

5 Answers   Google, IBM, Satyam,


What is updatedb?

0 Answers  


How can we "forked" process in UNIX? How then recognize in any of the branches we?

2 Answers   NIIT,


what does a process mean?

5 Answers   Infosys,


Which command will print your home directory on screen?

0 Answers  


How do you grep recursively?

0 Answers  


Categories