一些Solaris面试题


Posted in 面试题 onMarch 22, 2013
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...

面试题 相关文章推荐
什么是Smarty变量操作符?如何使用Smarty变量操作符
Jul 18 面试题
六道php面试题附答案
Jun 05 面试题
如何让Java程序执行效率更高
Jun 25 面试题
描述内存分配方式以及它们的区别
Oct 15 面试题
北京SQL新华信咨询
Sep 30 面试题
一套.net面试题及答案
Nov 02 面试题
网络安全类面试题
Aug 01 面试题
What's the difference between an interface and abstract class? (接口与抽象类有什么区别)
Oct 29 面试题
linux面试题参考答案(10)
Nov 04 面试题
史上最全面的Java面试题汇总!
Feb 03 面试题
四种会话跟踪技术
May 20 面试题
Java软件工程师综合面试题笔试题
Sep 08 面试题
网上常见的一份Linux面试题(多项选择部分)
Feb 07 #面试题
常用UNIX 命令(Linux的常用命令)
Jul 10 #面试题
如何开启linux的ssh服务
Jun 03 #面试题
Shell编程面试题
May 30 #面试题
如何进行Linux分区优化
Feb 12 #面试题
一些Unix笔试题和面试题
Jan 22 #面试题
某/etc/fstab文件中的某行如下: /dev/had5 /mnt/dosdata msdos defaults,usrquota 1 2 请解释其含义
Sep 18 #面试题
You might like
星际实力自我测试
2020/03/04 星际争霸
跟我学Laravel之安装Laravel
2014/10/15 PHP
php上传图片并压缩的实现方法
2015/12/22 PHP
session 加入redis的实现代码
2016/07/15 PHP
IE与firefox下Dhtml的一些区别小结
2009/12/02 Javascript
让div层随鼠标移动的实现代码 ie ff
2009/12/18 Javascript
关于捕获用户何时点击window.onbeforeunload的取消事件
2011/03/06 Javascript
JQuery select控件的相关操作实现代码
2012/09/14 Javascript
jQuery移动和复制dom节点实用DOM操作案例
2012/12/17 Javascript
浅谈JavaScript Date日期和时间对象
2014/12/29 Javascript
JS操作XML实例总结(加载与解析XML文件、字符串)
2015/12/08 Javascript
深入探究AngularJS框架中Scope对象的超级教程
2016/01/04 Javascript
高性能JavaScript循环语句和条件语句
2016/01/20 Javascript
浅析jquery与checkbox的checked属性的问题
2016/04/27 Javascript
Javascript中浏览器窗口的基本操作总结
2016/08/18 Javascript
AngularJS中过滤器的使用与自定义实例代码
2016/09/17 Javascript
JavaScript 函数节流详解及方法总结
2017/02/09 Javascript
JavaScript实现的商品抢购倒计时功能示例
2017/04/17 Javascript
利用jsonp与代理服务器方案解决跨域问题
2017/09/14 Javascript
极简主义法编写JavaScript类
2017/11/02 Javascript
使用ajax的post同步执行(实现方法)
2017/12/21 Javascript
JS温故而知新之变量提升和时间死区
2019/01/27 Javascript
javascript 原型与原型链的理解及应用实例分析
2020/02/10 Javascript
python复制文件的方法实例详解
2015/05/22 Python
用python实现名片管理系统
2020/06/18 Python
python获取整个网页源码的方法
2020/08/03 Python
Collection和Collections的区别
2016/05/02 面试题
GWT的应用有哪两种部署模式
2012/12/21 面试题
学生自我鉴定
2013/12/18 职场文书
小学信息技术教学反思
2014/02/10 职场文书
建筑管理专业求职信
2014/07/28 职场文书
党支部综合考察意见
2015/06/01 职场文书
法定代表人免职证明
2015/06/24 职场文书
2016年员工政治思想表现评语
2015/12/02 职场文书
MySQL数据库必备之条件查询语句
2021/10/15 MySQL
mysql聚集索引、辅助索引、覆盖索引、联合索引的使用
2022/02/12 MySQL