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

面试题 相关文章推荐
如何减少垃圾回收让内存更加有效使用
Oct 18 面试题
Tomcat Mysql datasource数据源配置
Dec 28 面试题
JNI的定义
Nov 25 面试题
精伦电子Java笔试题
Jan 16 面试题
八皇后问题,输出了所有情况,不过有些结果只是旋转了90度
Aug 15 面试题
使用索引(Index)有哪些需要考虑的因素
Oct 19 面试题
.net工程师笔试题
Jun 09 面试题
C#中有没有运算符重载?能否使用指针?
May 05 面试题
How to spawning asynchronous work in J2EE
Aug 29 面试题
你在项目中用到了xml技术的哪些方面?如何实现的?
Jan 26 面试题
shell变量的作用空间是什么
Aug 17 面试题
北京捷通华声语音技术有限公司Java软件工程师笔试题
Apr 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
WIN98下Apache1.3.14+PHP4.0.4的安装
2006/10/09 PHP
PHP图像处理之imagecreate、imagedestroy函数介绍
2014/11/19 PHP
php返回当前日期或者指定日期是周几
2015/05/21 PHP
ThinkPHP框架搭建及常见问题(XAMPP安装失败、Apache/MySQL启动失败)
2016/04/15 PHP
php实现商城购物车的思路和源码分析
2020/07/23 PHP
JavaScript 组件之旅(四):测试 JavaScript 组件
2009/10/28 Javascript
js loading加载效果实现代码
2009/11/24 Javascript
jQuery入门问答 整理的几个常见的初学者问题
2010/02/22 Javascript
关于Jqzoom的使用心得 jquery放大镜效果插件
2010/04/12 Javascript
jQuery easyui的validatebox校验规则扩展及easyui校验框validatebox用法
2016/01/18 Javascript
JS根据浏览器窗口大小实时动态改变网页文字大小的方法
2016/02/25 Javascript
NodeJS自定义模块写法(详解)
2017/06/27 NodeJs
BootStrap selectpicker后台动态绑定数据的方法
2017/07/28 Javascript
vue2.0移除或更改的一些东西(移除index key)
2017/08/28 Javascript
vue将时间戳转换成自定义时间格式的方法
2018/03/02 Javascript
vue图片上传本地预览组件使用详解
2019/02/20 Javascript
js实现简单选项卡制作
2020/08/05 Javascript
[08:42]DOTA2每周TOP10 精彩击杀集锦vol.2
2014/06/25 DOTA
python的re模块应用实例
2014/09/26 Python
Python导出DBF文件到Excel的方法
2015/07/25 Python
详解python进行mp3格式判断
2016/12/23 Python
基于DataFrame筛选数据与loc的用法详解
2018/05/18 Python
对Python3中列表乘以某一个数的示例详解
2019/07/20 Python
关于ZeroMQ 三种模式python3实现方式
2019/12/23 Python
Python基于xlrd模块处理合并单元格
2020/07/28 Python
HTML5的语法变化介绍
2013/08/13 HTML / CSS
英文版餐饮运营管理求职信
2013/11/06 职场文书
员工年终考核评语
2014/12/31 职场文书
酒店辞职书怎么写
2015/02/26 职场文书
MBA推荐信怎么写
2015/03/25 职场文书
2015入党个人自传范文
2015/06/26 职场文书
高中政治教师教学反思
2016/02/23 职场文书
《妈妈别哭,有我在》读后感3篇
2020/01/13 职场文书
如何用JavaScript学习算法复杂度
2021/04/30 Javascript
低版本Druid连接池+MySQL驱动8.0导致线程阻塞、性能受限
2021/07/01 MySQL
德劲DE1105机评
2022/04/05 无线电