IBM
Midat Hospital Interview Questions and Answers
Q1. How to search unix word in a file
Use the grep command to search for a word in a Unix file.
Use the grep command followed by the word you want to search and the file name
Add the -i flag for case-insensitive search
Use the -r flag to search recursively in directories
Example: grep 'word' file.txt
Example: grep -i 'word' file.txt
Example: grep -r 'word' directory/
Q2. How to remove an empty directory
Use the 'rmdir' command to remove an empty directory in the command line.
Navigate to the directory you want to remove
Use the 'rmdir' command followed by the directory name
Confirm the deletion when prompted
Q3. How to find a file in unix
Use the 'find' command in Unix to search for a file
Use the 'find' command followed by the directory to search in and the file name
For example, to find a file named 'example.txt' in the current directory: find . -name example.txt
You can also use wildcards like '*' to search for files with a certain pattern
Q4. How to replace unix to linux
To replace Unix with Linux, plan the migration process, assess compatibility, backup data, install Linux, test functionality, and train users.
Plan the migration process carefully
Assess compatibility of applications and data
Backup all important data before starting the migration
Install Linux on the systems
Test the functionality of all applications on Linux
Train users on the new Linux environment
Q5. How to zip a file in unix
To zip a file in Unix, use the 'zip' command followed by the name of the zip file and the files to be zipped.
Use the 'zip' command followed by the name of the zip file and the files to be zipped
For example, to zip a file named 'example.txt' into a zip file named 'example.zip', use the command 'zip example.zip example.txt'
Q6. How to find uniq nos.
To find unique numbers, remove duplicates from a list of numbers.
Create a new empty list to store unique numbers.
Iterate through the original list of numbers.
Check if the number is not already in the new list, then add it.
The new list will contain only unique numbers.
More about working at IBM
Interview Process at Midat Hospital
Reviews
Interviews
Salaries
Users/Month