Operational Solaris Interview Questions & Answers:
1. Display the all files recursively with path under current directory ?
- find . -depth -print
2. Change to a directory, which is having very long name ?
- cd CDMA_3X_GEN*Here original directory name is . .CDMA_3X_GENERATION_DATA..
3. Display the Disk Usage of file sizes under each directory in current Directory ?
- du -k * | sort .nr (or) du .k . | sort -nr
- tail .f Debug.logHere tail shows the newly appended data into Debug.log by some processes/user.
5. Search for a sample string in particular files?
- grep .Debug. *.confHere grep uses the string .Debug. to search in all files with extension..conf. under current directory.
6. Delete blank lines in a file?
- cat sample.txt | grep -v ‘^$' > new_sample.txt
7. List the hidden files in current directory?
- ls -a1 | grep "^."
8. List the files in current directory sorted by size?
- ls -l | grep ^- | sort -nr
9. Which obp command has a permanent allies?
When NValias need is:
In case system can not boot from primary disk and it is needed to make another boot disk to access the data , nvalias command is used.
nvalias command makes the device alias and assigns an alternate name to a physical disk. Physical address of target disk is required which can be had by show-disk command on ok>.
ok> nvalias disk7 /iommu@f,e0000000/sbus@f,e0001000/dma@3,81000/esp@3,80000/sd2,0
The new aliased disk can be named as boot disk or can be used for booting by referring its name
ok> setenv boot-device disk7
ok>reset
or
ok> boot disk7
The user is exisitng in the /etc/passwd file and the shell is also properly configured and there is no specific error messages in the /var/adm/messages file.
https://InterviewQuestionsAnswers.ORG.