一些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...

面试题 相关文章推荐
PHP如何对用户密码进行加密
Jul 31 面试题
Java面试题及答案
Sep 08 面试题
JAVA的事件委托机制和垃圾回收机制
Sep 07 面试题
如何设置Java的运行环境
Apr 05 面试题
什么是数组名
May 10 面试题
不用游标的SQL语句有哪些
Sep 07 面试题
杭州信雅达系统.NET工程师面试试题
Feb 08 面试题
ShellScript面试题一则-ShellScript编程
Mar 05 面试题
简述安装Slackware Linux系统的过程
May 08 面试题
捷科时代的软件测试笔试题
Nov 09 面试题
50道外企软件测试面试题
Aug 18 面试题
什么是Remote Module
Jun 10 面试题
网上常见的一份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
PHP ob缓存以及ob函数原理实例解析
2020/11/13 PHP
jquery 1.3.2 IE8中的一点点的小问题解决方法
2009/07/10 Javascript
ext 代码生成器
2009/08/07 Javascript
javascript addBookmark 加入收藏 多浏览器兼容
2009/08/15 Javascript
autoIMG 基于jquery的图片自适应插件代码
2011/03/12 Javascript
网页编辑器ckeditor和ckfinder配置步骤分享
2012/05/24 Javascript
Js 去掉字符串中的空格(实现代码)
2013/11/19 Javascript
用js代码改变单选框选中状态的简单实例
2013/12/18 Javascript
chrome下jq width()方法取值为0的解决方法
2014/05/26 Javascript
基于zepto.js实现仿手机QQ空间的大图查看组件ImageView.js详解
2015/03/05 Javascript
JavaScript获取URL汇总
2015/06/08 Javascript
jQuery移动页面开发中的触摸事件与虚拟鼠标事件简介
2015/12/03 Javascript
vuex实现登录状态的存储,未登录状态不允许浏览的方法
2018/03/09 Javascript
vue的传参方式汇总和router使用技巧
2018/05/22 Javascript
vue实现商城秒杀倒计时功能
2019/12/12 Javascript
JS Web Flex弹性盒子模型代码实例
2020/03/10 Javascript
Vue 请求传公共参数的操作
2020/07/31 Javascript
Django发送html邮件的方法
2015/05/26 Python
python对于requests的封装方法详解
2019/01/03 Python
Python函数的迭代器与生成器的示例代码
2020/06/18 Python
Clarisonic美国官网:科莱丽声波洁面仪
2017/10/12 全球购物
ManoMano英国:欧洲第一家专注于DIY和园艺市场的电商平台
2020/03/12 全球购物
北京鼎普科技股份有限公司软件测试面试题
2012/04/07 面试题
社区志愿者心得体会
2014/01/03 职场文书
怎么写好自荐书
2014/03/02 职场文书
公益广告语集锦
2014/03/13 职场文书
运动会跳远广播稿5篇
2014/09/17 职场文书
乡镇群众路线教育实践活动整改措施
2014/10/04 职场文书
2014年图书管理员工作总结
2014/12/01 职场文书
解除劳动合同通知书范本
2015/04/16 职场文书
2015年药房工作总结
2015/04/25 职场文书
公司年会开场白
2015/06/01 职场文书
节约用水广告语60条
2019/11/14 职场文书
小程序实现文字循环滚动动画
2021/06/14 Javascript
mysql如何查询连续记录
2022/05/11 MySQL
html5+实现plus.io进行拍照和图片等获取
2022/06/01 HTML / CSS