一些Solaris面试题


Posted in 面试题 onDecember 22, 2015
1. List the files in current directory sorted by size ? – ls -l | grep ^- | sort -nr
2. List the hidden files in current directory ? – ls -a1 | grep “^\.”
3. Delete blank lines in a file ? – cat sample.txt | grep -v ‘^$’ > new_sample.txt
4. 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.
5. Display the last newly appending lines of a file during appendingdata to the same file by some processes ? – tail .f Debug.logHere tail shows the newly appended data into Debug.log by some processes/user.
6. Display the Disk Usage of file sizes under each directory in currentDirectory ? – du -k * | sort .nr (or) du .k . | sort -nr
7. Change to a directory, which is having very long name ? – cd CDMA_3X_GEN*Here original directory name is . .CDMA_3X_GENERATION_DATA..
8. Display the all files recursively with path under current directory ? – find . -depth -print
9. Set the Display automatically for the current new user ? – export DISPLAY=`eval ‘who am i | cut -d”(” -f2 | cut -d”)” -f1′`Here in above command, see single quote, double quote, grave ascent is used. Observe carefully.
10. Display the processes, which are running under yourusername ? – ps .aef | grep MaheshvjHere, Maheshvj is the username.
11. List some Hot Keys for bash shell ? – Ctrl+l . Clears the Screen. Ctrl+r . Does a search in previously given commands in shell. Ctrl+u – Clears the typing before the hotkey. Ctrl+a . Places cursor at the beginning of the command at shell. Ctrl+e . Places cursor at the end of the command at shell. Ctrl+d . Kills the shell. Ctrl+z . Places the currently running process into background.
12. Display the files in the directory by file size ? – ls .ltr | sort .nr .k 5
13. How to save man pages to a file ? – man | col .b > Example : man top | col .b > top_help.txt
14. How to know the date & time for . when script is executed ? – Add the following script line in shell script.eval echo “Script is executed at `date`” >> timeinfo.infHere, .timeinfo.inf. contains date & time details ie., when script is executed and history related to execution.
15. How do you find out drive statistics ? – iostat -E
16. Display disk usage in Kilobytes ? – du -k
17. Display top ten largest files/directories ? – du -sk * | sort -nr | head
18. How much space is used for users in kilobytes ? – quot -af
19. How to create null file ? – cat /dev/null > filename1
20. Access common commands quicker ? – ps -ef | grep -i $@
21. Display the page size of memory ? – pagesize -a
22. Display Ethernet Address arp table ? – arp -a
23. Display the no.of active established connections to localhost ? – netstat -a | grep EST
24. Display the state of interfaces used for TCP/IP traffice ? – netstat -i
25. Display the parent/child tree of a process ? – ptree Example: ptree 1267
26. Show the working directory of a process ? – pwdx Example: pwdx 1267
27. Display the processes current open files ? – pfiles Example: pfiles 1267
28. Display the inter-process communication facility status ? – ipcs
29. Display the top most process utilizing most CPU ? – top .b 1
30. Alternative for top command ? – prstat -a

Tags in this post...

面试题 相关文章推荐
你所知道的集合类都有哪些?主要方法?
Dec 31 面试题
简单介绍Object类的功能、常用方法
Oct 02 面试题
Java方面的关于数组和继承的笔面试题
Sep 18 面试题
阿里巴巴Oracle DBA笔试题答案-备份恢复类
Nov 20 面试题
DataList 能否分页,请问如何实现?
May 03 面试题
你对IPv6了解程度
Feb 09 面试题
什么叫做SQL注入,如何防止
Oct 04 面试题
Solaris操作系统的线程机制
Dec 23 面试题
介绍一下Linux内核的排队自旋锁
Aug 27 面试题
某科技软件测试面试题
May 19 面试题
介绍一下MYSQL常用的优化技巧
Oct 25 面试题
如何在Shell脚本中使用函数
Sep 06 面试题
网上常见的一份Linux面试题(多项选择部分)
Sep 09 #面试题
常用UNIX 命令(Linux的常用命令)
Dec 26 #面试题
如何开启linux的ssh服务
Feb 14 #面试题
Shell编程面试题
May 29 #面试题
如何进行Linux分区优化
Sep 13 #面试题
一些Unix笔试题和面试题
Sep 25 #面试题
某/etc/fstab文件中的某行如下: /dev/had5 /mnt/dosdata msdos defaults,usrquota 1 2 请解释其含义
Apr 11 #面试题
You might like
php正则过滤html标签、空格、换行符的代码(附说明)
2010/10/25 PHP
PHP判断变量是否为0的方法
2014/02/08 PHP
yii通过小物件生成view的方法
2016/10/08 PHP
PHP读取大文件的几种方法介绍
2016/10/27 PHP
详解php几行代码实现CSV格式文件输出
2017/07/01 PHP
发布BlueShow v1.0 图片浏览器(类似lightbox)blueshow.js 打包下载
2007/07/21 Javascript
javascript图像处理—仿射变换深度理解
2013/01/16 Javascript
jquery 倒计时效果实现秒杀思路
2013/09/11 Javascript
javascript与有限状态机详解
2014/05/08 Javascript
jQuery Ajax中的事件详细介绍
2015/04/16 Javascript
微信小程序使用第三方库Underscore.js步骤详解
2016/09/27 Javascript
jQuery实现表格元素动态创建功能
2017/01/09 Javascript
利用transition实现文字上下抖动的效果
2017/01/21 Javascript
使用Dropzone.js上传的示例代码
2017/10/10 Javascript
使用pm2自动化部署node项目的方法步骤
2019/01/28 Javascript
微信小程序 swiper 组件遇到的问题及解决方法
2019/05/26 Javascript
react 组件传值的三种方法
2019/06/03 Javascript
package.json各个属性说明详解
2020/03/11 Javascript
Python中使用SAX解析xml实例
2014/11/21 Python
Python实现字典的遍历与排序功能示例
2017/12/23 Python
详解用pyecharts Geo实现动态数据热力图城市找不到问题解决
2019/06/26 Python
对python 调用类属性的方法详解
2019/07/02 Python
python中adb有什么功能
2020/06/07 Python
古驰英国官网:GUCCI英国
2020/03/07 全球购物
营销与策划应届生求职信
2013/11/04 职场文书
大学生学年自我鉴定
2014/02/10 职场文书
企业党员公开承诺书
2014/03/26 职场文书
小学数学课后反思
2014/04/23 职场文书
俞敏洪一分钟演讲稿
2014/08/26 职场文书
辞职信的写法
2015/02/27 职场文书
追讨欠款律师函
2015/05/27 职场文书
2015年十月一日放假通知
2015/08/18 职场文书
2016年小学生教师节广播稿
2015/12/18 职场文书
《春酒》教学反思
2016/02/22 职场文书
sql字段解析器的实现示例
2021/06/23 SQL Server
numpy array找出符合条件的数并赋值的示例代码
2022/06/01 Python