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

面试题 相关文章推荐
在C中是否有模拟继承等面向对象程序设计特性的好方法
May 22 面试题
SQL Server的固定数据库角色都有哪些?对应的服务器权限有哪些?
May 18 面试题
阿里巴巴Oracle DBA笔试题答案-备份恢复类
Nov 20 面试题
DataList 能否分页,请问如何实现?
May 03 面试题
linux面试题参考答案(9)
Jan 07 面试题
EJB实例的生命周期
Oct 28 面试题
EntityManager都有哪些方法
Nov 01 面试题
一些关于MySql加速和优化的面试题
Jan 30 面试题
编程输出如下图形
Nov 24 面试题
Java程序员面试90题
Oct 19 面试题
Set里的元素是不能重复的,那么用什么方法来区分重复与否呢? 是用==还是equals()? 它们有何区别?
Jul 27 面试题
解释i节点在文件系统中的作用
Nov 26 面试题
网上常见的一份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 查找字符串常用函数介绍
2012/06/07 PHP
关于使用key/value数据库redis和TTSERVER的心得体会
2013/06/28 PHP
php array_keys 返回数组的键名
2016/10/25 PHP
php 魔术常量详解及实例代码
2016/12/04 PHP
浅谈Yii乐观锁的使用及原理
2017/07/25 PHP
用showModalDialog弹出页面后,提交表单总是弹出一个新窗口
2009/07/18 Javascript
js null undefined 空区别说明
2010/06/13 Javascript
关于onScroll事件在IE6下每次滚动触发三次bug说明
2011/09/21 Javascript
js移除事件 js绑定事件实例应用
2012/11/28 Javascript
载入jQuery库的最佳方法详细说明及实现代码
2012/12/28 Javascript
js鼠标及对象坐标控制属性详细解析
2013/12/14 Javascript
js原型继承的两种方法对比介绍
2014/03/30 Javascript
JS实现网页背景颜色与select框中颜色同时变化的方法
2015/02/27 Javascript
JavaScript常用脚本汇总(三)
2015/03/04 Javascript
javascript使用avalon绑定实现checkbox全选
2015/05/06 Javascript
JS实现左右拖动改变内容显示区域大小的方法
2015/10/13 Javascript
很棒的js选项卡切换效果
2016/07/15 Javascript
手把手教你使用vue-cli脚手架(图文解析)
2017/11/08 Javascript
Vue服务器渲染Nuxt学习笔记
2018/01/31 Javascript
Python实现读取字符串按列分配后按行输出示例
2018/04/17 Python
python验证码识别教程之利用投影法、连通域法分割图片
2018/06/04 Python
python selenium 获取标签的属性值、内容、状态方法
2018/06/22 Python
Python使用百度api做人脸对比的方法
2019/08/28 Python
Python函数基本使用原理详解
2020/03/19 Python
Python接口开发实现步骤详解
2020/04/26 Python
CSS3之背景尺寸Background-size使用介绍
2013/10/14 HTML / CSS
临床专业自荐信
2014/06/22 职场文书
迎七一演讲稿
2014/09/12 职场文书
小学校园广播稿(3篇)
2014/09/19 职场文书
离婚协议书范本(通用篇)
2014/11/30 职场文书
报名委托书
2015/01/29 职场文书
亮剑观后感
2015/06/05 职场文书
八月迷情观后感
2015/06/11 职场文书
学校教学管理制度
2015/08/06 职场文书
发言稿之优秀教师篇
2019/09/26 职场文书
JavaScript中关于预编译、作用域链和闭包的理解
2021/03/31 Javascript