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

面试题 相关文章推荐
什么是类的返射机制
Feb 06 面试题
简述数据库的设计过程
Jun 22 面试题
命名空间(namespace)和程序集(Assembly)有什么区别
Sep 25 面试题
结构和类有什么异同
Jul 16 面试题
非常详细的C#面试题集
Jul 13 面试题
成都思必达公司C#程序员招聘面试题
Jun 26 面试题
internal修饰符起什么作用
Dec 16 面试题
Linux常见面试题
Oct 04 面试题
什么是设计模式
Jun 17 面试题
下面代码从性能上考虑,有什么问题
Apr 03 面试题
this关键字的作用
Jan 30 面试题
介绍一下Ruby的特点
Jan 20 面试题
网上常见的一份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最常用的ini函数分析 针对PHP.ini配置文件
2010/04/22 PHP
php中使用__autoload()自动加载未定义类的实现代码
2013/02/06 PHP
Laravel中如何增加自定义全局函数详解
2017/05/09 PHP
IE php关于强制下载文件的代码
2008/08/23 Javascript
jquery BS,dialog控件自适应大小
2009/07/06 Javascript
JavaScript 用Node.js写Shell脚本[译]
2012/09/20 Javascript
JavaScript词法作用域与调用对象深入理解
2012/11/29 Javascript
js监听滚动条滚动事件使得某个标签内容始终位于同一位置
2014/01/24 Javascript
Jquery的Tabs内容轮换效果实现代码,几行搞定
2014/02/12 Javascript
prototype框架中美元符号$用法分析
2016/01/22 Javascript
jQuery 翻页组件yunm.pager.js实现div局部刷新的思路
2016/08/11 Javascript
js实现自定义进度条效果
2017/03/15 Javascript
详解webpack进阶之插件篇
2017/07/06 Javascript
Angular实现的table表格排序功能完整示例
2017/12/22 Javascript
js捆绑TypeScript声明文件的方法教程
2018/04/13 Javascript
JS多个表单数据提交下的serialize()应用实例分析
2019/08/27 Javascript
浅谈React中组件逻辑复用的那些事儿
2020/05/21 Javascript
JQuery基于FormData异步提交数据文件
2020/09/01 jQuery
Express 配置HTML页面访问的实现
2020/11/01 Javascript
Python实现生成随机数据插入mysql数据库的方法
2017/12/25 Python
python实现简单的文字识别
2018/11/27 Python
Django ORM 自定义 char 类型字段解析
2019/08/09 Python
Python使用docx模块实现刷题功能代码
2020/02/13 Python
使用Python获取当前工作目录和执行命令的位置
2020/03/09 Python
Python中zip函数如何使用
2020/06/04 Python
如何用用Python将地址标记在地图上
2021/02/07 Python
美国最大的珠宝首饰网上商城:Jewelry.com
2016/07/22 全球购物
新闻记者个人求职的自我评价
2013/11/28 职场文书
网络工程师自荐书范文
2014/04/01 职场文书
3分钟英语演讲稿
2014/04/29 职场文书
城管综合整治方案
2014/05/01 职场文书
应届毕业生自荐信
2014/05/28 职场文书
排查整治工作方案
2014/06/09 职场文书
大学生职业生涯规划大赛作品(精品)
2014/09/17 职场文书
煤矿施工安全协议书
2016/03/22 职场文书
Nginx性能优化之Gzip压缩设置详解(最大程度提高页面打开速度)
2022/02/12 Servers