一些Solaris面试题


Posted in 面试题 onDecember 22, 2015
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...

面试题 相关文章推荐
分解成质因数(如435234=251*17*17*3*2,据说是华为笔试题)
Jul 16 面试题
不开辟用于交换数据的临时空间,如何完成字符串的逆序
Dec 02 面试题
数据库设计的包括哪两种,请分别进行说明
Jul 15 面试题
介绍一下SQL注入攻击的种类和防范手段
Feb 18 面试题
C#可否对内存进行直接的操作
Feb 26 面试题
linux面试题参考答案(2)
Dec 06 面试题
linux面试题参考答案(4)
Jan 28 面试题
Prototype中如何为一个元素添加一个方法
Dec 08 面试题
Python面试题:Python是如何进行内存管理的
Aug 04 面试题
JAVA高级程序员面试题
Sep 06 面试题
中软国际Java程序员笔试题
Jul 19 面试题
Java面试题冲刺第十五天--设计模式
Aug 07 面试题
网上常见的一份Linux面试题(多项选择部分)
Sep 09 #面试题
常用UNIX 命令(Linux的常用命令)
Dec 26 #面试题
如何开启linux的ssh服务
Feb 14 #面试题
Shell编程面试题
May 29 #面试题
如何进行Linux分区优化
Sep 13 #面试题
一些Unix笔试题和面试题
Sep 25 #面试题
某/etc/fstab文件中的某行如下: /dev/had5 /mnt/dosdata msdos defaults,usrquota 1 2 请解释其含义
Apr 11 #面试题
You might like
PHP生成HTML静态页面实例代码
2008/08/31 PHP
PHP遍历二维数组的代码
2011/04/22 PHP
php中用加号与用array_merge合并数组的区别深入分析
2013/06/03 PHP
php编写的简单页面跳转功能实现代码
2013/11/27 PHP
php使用数组填充下拉列表框的方法
2015/03/31 PHP
PHP的Laravel框架结合MySQL与Redis数据库的使用部署
2016/03/21 PHP
利用PHP判断文件是否为图片的方法总结
2017/01/06 PHP
PHP实现微信提现功能(微信商城)
2019/11/21 PHP
javascript 获取图片颜色
2009/04/05 Javascript
让iframe子窗体取父窗体地址栏参数(querystring)
2009/10/13 Javascript
Chrome中JSON.parse的特殊实现
2011/01/12 Javascript
jQuery ajax(复习)—Baidu ajax request分离版
2013/01/24 Javascript
JS实现兼容各浏览器解析XML文档数据的方法
2015/06/01 Javascript
jQuery实现图片上传和裁剪插件Croppie
2015/11/29 Javascript
Javascript之Number对象介绍
2016/06/07 Javascript
js基于FileSaver.js 浏览器导出Excel文件的示例
2017/08/15 Javascript
vue element-ui之怎么封装一个自己的组件的详解
2019/05/20 Javascript
vue+eslint+vscode配置教程
2019/08/09 Javascript
原生js实现弹窗消息动画
2020/11/20 Javascript
Python字符串的encode与decode研究心得乱码问题解决方法
2009/03/23 Python
Python中基本的日期时间处理的学习教程
2015/10/16 Python
基于ID3决策树算法的实现(Python版)
2017/05/31 Python
python中实现指定时间调用函数示例代码
2017/09/08 Python
python将数组n等分的实例
2019/12/02 Python
在python中利用pycharm自定义代码块教程(三步搞定)
2020/04/15 Python
什么是Python变量作用域
2020/06/03 Python
交通事故调解协议书
2014/04/16 职场文书
离婚财产分隔协议书
2014/10/23 职场文书
党员违纪检讨书怎么写
2014/11/01 职场文书
优秀教师申报材料
2014/12/16 职场文书
沂蒙六姐妹观后感
2015/06/08 职场文书
嘉年华活动新闻稿
2015/07/17 职场文书
2015年秋学期师德师风建设工作总结
2015/10/23 职场文书
2016暑期校本培训心得体会
2016/01/08 职场文书
学习心得体会
2019/06/20 职场文书
漫画「处刑少女的生存之道」第3卷封面公开
2022/03/21 日漫