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

面试题 相关文章推荐
金智子午JAVA面试题
Sep 04 面试题
"序列点" 是什么
Jul 29 面试题
.NET初级开发工程师面试题
Apr 18 面试题
世界经理人咨询有限公司面试
Sep 23 面试题
string = null 和string = ''的区别
Apr 28 面试题
四川internet信息高速公路(C#)笔试题
Feb 29 面试题
介绍一下Make? 为什么使用make
Jul 31 面试题
中科软测试工程师面试题
Jun 16 面试题
Python是如何进行类型转换的
Jun 09 面试题
介绍一下Java的事务处理
Dec 07 面试题
shell的种类有哪些
Apr 15 面试题
一道Delphi面试题
Oct 28 面试题
网上常见的一份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将textarea数据提交到mysql出现很多空格的解决方法
2014/12/19 PHP
深入讲解PHP的Yii框架中的属性(Property)
2016/03/18 PHP
PHP5.4起内置web服务器使用方法
2016/08/09 PHP
基于ThinkPHP实现的日历功能实例详解
2017/04/15 PHP
CodeIgniter整合Smarty的方法详解
2017/08/25 PHP
PHP使用mongoclient简单操作mongodb数据库示例
2019/02/08 PHP
用JSON做数据传输格式中的一些问题总结
2011/12/21 Javascript
修改jQuery Validation里默认的验证方法
2012/02/14 Javascript
js 获取后台的字段 改变 checkbox的被选中的状态 代码
2013/06/05 Javascript
JavaScript自动设置IFrame高度的小例子
2013/06/08 Javascript
利用浏览器全屏api实现js全屏
2014/01/16 Javascript
node.js入门教程迷你书、node.js入门web应用开发完全示例
2014/04/06 Javascript
Javascript学习笔记之 函数篇(三) : 闭包和引用
2014/11/23 Javascript
jQuery实现Email邮箱地址自动补全功能代码
2015/11/03 Javascript
jQuery中iframe的操作(点击按钮新增窗口)
2016/04/20 Javascript
简单实现的JQuery文本框水印插件
2016/06/14 Javascript
json定义及jquery操作json的方法
2016/10/03 Javascript
Chrome浏览器的alert弹窗禁止再次弹出后恢复的方法
2016/12/30 Javascript
Angular+Node生成随机数的方法
2017/06/16 Javascript
Vue2.0 事件的广播与接收(观察者模式)
2018/03/14 Javascript
微信小程序动态增加按钮组件
2018/09/14 Javascript
原生JS实现的放大镜特效示例【测试可用】
2018/12/08 Javascript
Vue3项目打包后部署到服务器 请求不到后台接口解决方法
2020/02/06 Javascript
[38:44]DOTA2上海特级锦标赛A组小组赛#2 Secret VS CDEC第二局
2016/02/25 DOTA
低版本中Python除法运算小技巧
2015/04/05 Python
十个Python程序员易犯的错误
2015/12/15 Python
django限制匿名用户访问及重定向的方法实例
2018/02/07 Python
使用python搭建服务器并实现Android端与之通信的方法
2019/06/28 Python
深入浅析python的第三方库pandas
2020/02/13 Python
Jupyter安装拓展nbextensions及解决官网下载慢的问题
2021/03/03 Python
html5定制表单_动力节点Java学院整理
2017/07/11 HTML / CSS
澳洲在线厨具商店:Kitchen Style
2018/05/05 全球购物
公司前台辞职报告
2014/01/19 职场文书
合伙购房协议样本
2014/10/06 职场文书
个人党性分析材料
2014/12/19 职场文书
十二月早安励志心语大全
2019/12/03 职场文书