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

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 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' - 29 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. How to Change Default Boot Kernel in Linux ?Unix2016-11-11 11:31:08

Ans. https://www.redhat.com/archives/rhl-list/2005-April/msg04167.html

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

   Like         Discuss         Correct / Improve     unix  change default kernel     Asked in 1 Companies


 Q4. What will be the crontab to run a job every last day of month ?Unix2016-12-16 09:34:26

Ans. 59 23 28-31 * * [ "$(date +%d -d tomorrow)" = "01" ] && job_name

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

   Like         Discuss         Correct / Improve     unix  crontab     Asked in 1 Companies


 Q5. 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     Asked in 1 Companies


 Q6. 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     Asked in 1 Companies


 Q7. How do you monitor the server resources if inadvertently high traffic is reported ?Support2017-01-16 10:11:50

Ans. We use SAR command for that purpose. We also have GUI system monitoring tool to keep real time check of requests, load and memory usage.

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

   Like         Discuss         Correct / Improve     production support  unix  SAR


 Q8. How do you monitor your logs while investigating a high severity problem ?Support2017-01-16 10:12:06

Ans. We try to look for errors in the last n minutes when the issue occurred. If the issue is still occurring intermittently, We tail the logs for different application server instances to see the error snippets coming in the live logs.

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

   Like         Discuss         Correct / Improve     production support  unix  application logs


 Q9. Do you use command aliases while doing your work ?General2017-01-16 10:13:45

Ans. Yes , I have created many aliases and saved them within my .profile file so that the system loads them, the each time i logs onto the server.

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

   Like         Discuss         Correct / Improve     unix  command aliasis


 Q10. How to use Find command in Unix ?Unix2017-01-17 13:43:38

Ans. http://javasearch.buggybread.com/UnixCommand/searchUnixCommandsScripts.php?keyword=find

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

   Like         Discuss         Correct / Improve     find command     Asked in 1 Companies


 Q11. 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


 Q12. What is the difference between grep, zgrep and egrep ?Unix2018-02-08 20:18: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     grep  zgrep  egrep


 Q13. How can we see running logs ?Unix2018-02-08 20:18:58

Ans. tail -f <LOG_FILE_NAME>

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

   Like         Discuss         Correct / Improve     


 Q14. What is the command to change file / folder permissions ? What command should we use if we would like to give most liberal position on the file ?Unix2018-02-08 20:20:02

Ans. chmod is used to change permissions on file or folder.

chmod 777 <FILE/FOLDER NAME>

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

   Like         Discuss         Correct / Improve     chmod


 Q15. How to see last 500 lines of a log or text file Unix2018-02-08 20:20:42

Ans. tail -500 <FILE_NAME>

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

   Like         Discuss         Correct / Improve     unix  log file


 Q16. Can we run grep on zipped file ?Unix2018-02-08 20:21:22

Ans. We can zgrep for that

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

   Like         Discuss         Correct / Improve     grep  zgrep


 Q17. How to find something within a folder and all it's sub folderUnix2018-02-08 20:22:04

 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     find  unix


 Q18. How to find lines in a file containing a particular text and get those lines in a new fileUnix2018-02-08 20:23:53

Ans. grep "Some Text" EXISTING_FILE > NEW FILE

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

   Like         Discuss         Correct / Improve     grep


 Q19. Have you ever used awk and sed ? What's the difference between the two ?Unix2018-02-08 20:24:34

 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     


 Q20. How to count lines in a file having a particular textUnix2018-02-08 20:25:15

Ans. grep "Some Text" FILE | wc -l

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

   Like         Discuss         Correct / Improve     


 Q21. How can we create directories recursivelyUnix2018-02-08 20:26:10

Ans. mkdir -p /home/newParentDir/newDir

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

   Like         Discuss         Correct / Improve     


 Q22. Find all files from a directory (including sub directories ) that could contain dates in a specific format.Unix2018-07-27 13:32:39

 This question was recently asked at 'Hitachi'.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          Asked in 1 Companies


 Q23. Difference between su <username> vs sudo su <username>Unix2018-09-19 13:03:19

 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     


 Q24. What happens if we do su without user name ?Unix2018-09-19 13:04:17

Ans. it will start shell for user root and will ask for the password for root user

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

   Like         Discuss         Correct / Improve     


 Q25. 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     Asked in 1 Companies      basic


 Q26. Difference between kill -9 and kill -15 ?Unix2019-04-09 09:01:34

 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     


 Q27. How do you ftp files to a different server ? Do you use scp or mput etc.Unix2019-08-09 09:41:35

Ans. I use both mput as well as scp. mput usually with sftp

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

   Like         Discuss         Correct / Improve     unix commands  ftp


 Q28. Can we change permissions recursively for all folders and files within a single folder ?Unix2019-08-09 09:42:25

 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


 Q29. Explain unix commands - cat and pwd.Unix2019-09-11 08:08:42

 This question was recently asked at 'Tech Mahindra'.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          Asked in 1 Companies


 Q30. 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


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: