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

面试题 相关文章推荐
上海方立数码笔试题
Oct 18 面试题
C语言笔试题
Sep 04 面试题
将n个数按输入顺序的逆序排列,用函数实现
Nov 14 面试题
"引用"与指针的区别是什么
Sep 07 面试题
几道数据库的概念性面试题
May 30 面试题
.NET概念性的面试题
Feb 29 面试题
RIP版本1跟版本2的区别
Dec 30 面试题
星空联盟C# .net笔试题
Dec 05 面试题
Linux面试题LINUX系统类
Nov 25 面试题
GWT (Google Web Toolkit)有哪些主要的原件组成?
Jun 08 面试题
swtich是否能作用在byte上,是否能作用在long上,是否能作用在String上
Jul 06 面试题
Servlet如何得到服务器的信息
Dec 22 面试题
网上常见的一份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
星际争霸 Starcraft 游戏介绍
2020/03/14 星际争霸
Extended CHM PHP 语法手册之 DIY
2006/10/09 PHP
PHP4 与 MySQL 交互使用
2006/10/09 PHP
php模板引擎技术简单实现
2016/03/15 PHP
PHP封装的验证码工具类定义与用法示例
2018/08/22 PHP
xml和web特殊字符
2009/04/28 Javascript
IE6、IE7中setAttribute不支持class/for/rowspan/colspan等属性
2011/08/28 Javascript
jQuery代码优化 事件委托篇
2011/11/01 Javascript
Javascript拓展String方法小结
2013/07/08 Javascript
jQuery判断复选框是否勾选的原理及示例
2014/05/21 Javascript
indexedDB bootstrap angularjs之 MVC DOMO (应用示例)
2016/06/20 Javascript
第七篇Bootstrap表单布局实例代码详解(三种表单布局)
2016/06/21 Javascript
总结JavaScript在IE9之前版本中内存泄露问题
2018/04/28 Javascript
node中modules.exports与exports导出的区别
2018/06/08 Javascript
angular 实现的输入框数字千分位及保留几位小数点功能示例
2018/06/19 Javascript
vue 巧用过渡效果(小结)
2018/09/22 Javascript
js中this的指向问题归纳总结
2018/11/28 Javascript
JavaScript时间日期操作实例小结【5个示例】
2018/12/22 Javascript
node.js连接mysql与基本用法示例
2019/01/05 Javascript
JavaScript实现多文件下载方法解析
2020/08/07 Javascript
[02:39]DOTA2英雄基础教程 天怒法师
2013/11/29 DOTA
[02:36]DOTA2亚洲邀请赛小组赛精彩集锦:奇迹哥卡尔秀翻全场
2017/03/28 DOTA
Python中关于字符串对象的一些基础知识
2015/04/08 Python
python实现在控制台输入密码不显示的方法
2015/07/02 Python
Python的Django框架中设置日期和字段可选的方法
2015/07/17 Python
Python微信库:itchat的用法详解
2017/08/14 Python
Python闭包思想与用法浅析
2018/12/27 Python
详解Python3 对象组合zip()和回退方式*zip
2019/05/15 Python
python中tkinter的应用:修改字体的实例讲解
2019/07/17 Python
Python解释器及PyCharm工具安装过程
2020/02/26 Python
python中最小二乘法详细讲解
2021/02/19 Python
基于css3的属性transition制作菜单导航效果
2015/09/01 HTML / CSS
CSS3制作炫酷的下拉菜单及弹起式选单的实例分享
2016/05/17 HTML / CSS
英国首屈一指的票务公司:See Tickets
2019/05/11 全球购物
英国床垫和床架购物网站:Bedman
2019/11/04 全球购物
升职感谢领导的话语及升职感谢信
2019/06/24 职场文书