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

面试题 相关文章推荐
构造器Constructor是否可被override?
Aug 06 面试题
类、抽象类、接口的差异
Jun 13 面试题
附答案的Java面试题
Nov 19 面试题
编写用C语言实现的求n阶阶乘问题的递归算法
Oct 21 面试题
"火柴棍式"程序员面试题
Mar 16 面试题
枚举与#define宏的区别
Apr 30 面试题
为数据库创建索引都需要注意些什么
Jul 17 面试题
.net开发工程师面试题
Feb 25 面试题
什么是用户模式(User Mode)与内核模式(Kernel Mode) ?
Jul 21 面试题
linux面试题参考答案(8)
Aug 11 面试题
Linux中如何用命令创建目录
Dec 02 面试题
J2EE面试题
Mar 14 面试题
网上常见的一份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
Win9x/ME下Apache+PHP安装配置
2006/10/09 PHP
php下实现一个阿拉伯数字转中文数字的函数
2008/07/10 PHP
fleaphp rolesNameField bug解决方法
2011/04/23 PHP
PHP按行读取、处理较大CSV文件的代码实例
2014/04/09 PHP
PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法
2014/06/23 PHP
把input初始值不写value的具体实现方法
2013/07/04 Javascript
基于javascript滚动图片具体实现
2013/11/18 Javascript
javascript日期格式化方法汇总
2015/10/04 Javascript
jQuery+PHP实现可编辑表格字段内容并实时保存
2015/10/09 Javascript
Zero Clipboard实现浏览器复制到剪贴板的方法(多个复制按钮)
2016/03/24 Javascript
获取select的value、text值的简单示例(jquery与javascript)
2016/12/07 Javascript
JS双击变input框批量修改内容
2016/12/12 Javascript
你不知道的 javascript【推荐】
2017/01/08 Javascript
图片懒加载插件实例分享(含解析)
2017/01/09 Javascript
Layui给数据表格动态添加一行并跳转到添加行所在页的方法
2018/08/20 Javascript
JS/HTML5游戏常用算法之碰撞检测 包围盒检测算法详解【凹多边形的分离轴检测算法】
2018/12/13 Javascript
jquery插件开发模式实例详解
2019/07/20 jQuery
JavaScript相等运算符的九条规则示例详解
2019/10/20 Javascript
小程序识别身份证,银行卡,营业执照,驾照的实现
2019/11/05 Javascript
全面解析Vue中的$nextTick
2020/12/24 Vue.js
[11:44]Ti9 OG夺冠时刻
2019/08/25 DOTA
python中日期和时间格式化输出的方法小结
2015/03/19 Python
python学习之编写查询ip程序
2016/02/27 Python
python妙用之编码的转换详解
2017/04/21 Python
python里使用正则的findall函数的实例详解
2017/10/19 Python
Python实现的建造者模式示例
2018/08/06 Python
python opencv对图像进行旋转且不裁剪图片的实现方法
2019/07/09 Python
利用pyecharts实现地图可视化的例子
2019/08/12 Python
Python更换pip源方法过程解析
2020/05/19 Python
Python如何实现后端自定义认证并实现多条件登陆
2020/06/22 Python
html5借用repeating-linear-gradient实现一把刻度尺(ruler)
2019/09/09 HTML / CSS
详解HTML5布局和HTML5标签
2020/10/26 HTML / CSS
开办化妆品公司创业计划书
2013/12/26 职场文书
欢送退休感言
2014/02/08 职场文书
2014年党员教师自我剖析材料
2014/09/30 职场文书
期中考试复习计划
2015/01/19 职场文书