Unix - Interview Questions and Answers for 'Unix command' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Interview Questions


 3193 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Unix - Interview Questions and Answers for 'Unix command' - 8 question(s) found - Order By Newest

 Q1. How to display and set the Class path in Unix ?
Anonymous
Ans. To display the current CLASSPATH variable, use these commands in UNIX (Bourne shell):

% echo $CLASSPATH

To delete the current contents of the CLASSPATH variable,

In UNIX: % unset CLASSPATH; export CLASSPATH

To set the CLASSPATH variable,

In UNIX: % CLASSPATH=/home/george/java/classes; export CLASSPATH

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     unix   unix commands   classpath


 Q2. What is the use of !! command ? Can I use it with conjunction to some other string to complete a command ? Unix
Admin
info@buggybread.com
Ans. Its used to execute last command. Yes this can be used with other string to execute new command. For eg - if ls was the last command, We can execute !! -l for having the long listing.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     unix   unix commands   !! unix command   build management   release management


 Q3. Write a unix command to find top 10 files by size ?Unix2016-12-16 09:35:31

Ans. du -a /var | sort -n -r | head -n 10

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     unix command     HCL Technologies


 Q4. What are fields that gets displayed when you execute "Top" command and briefly explain each field ?Unix2016-12-16 09:41:47

Ans. PID - process identification number is an identification number that is automatically assigned to each process when it is created

USER - User Name

PR - PR is the process actual priority

NI is the nice value, which is a user-space concept.

VIRT -Virtual Image (kb). The total amount of virtual memory used by the task.

RES - Resident size (kb). The non-swapped physical memory a task has used.

SHR - Shared Mem size (kb). The amount of shared memory used by a task.

S - Process Status. The status of the task which can be one of:

D = uninterruptible sleep
R = running
S = sleeping
T = traced or stopped
Z = zombie

%CPU - % CPU usage

%MEM - % MEM Usage

TIME - Total CPU time the task has used since it started.

COMMAND - Command which was used to execute the process

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     top command  unix command     HCL Technologies


 Q5. As root, if you have to assign the owner for the file and set only read permission for the owner, Write a unix command to do it.Unix2017-08-10 16:56:27

 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     unix commands  setting file permissions  chown  chmod


 Q6. Can you tell me any 10 unix command you have worked with ?Unix2018-11-27 09:14:38

Ans. grep, ls, kill, vi , scp , wget,telnet, zip, unzip,mv,cp

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     unix commands     Amdocs      basic


 Q7. How to append the output of a command to file Unix
a. command < file
b. command > file
c. command <> file
d. command >> file

Ans.d. command >> file

 Q8. Which command helps you know in which folder you currently are ?Unix
a. cat
b. pwd
c. vi
d. who am i

Ans.b. pwd



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: