一些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语言编程练习
Apr 02 面试题
函数指针的定义是什么
Aug 14 面试题
托管代码(Managed Code)和非托管代码(Unmanaged Code)有什么区别
Sep 29 面试题
上海中网科技笔试题
Feb 19 面试题
在c#中using和new这两个关键字有什么意义
May 19 面试题
如何利用find命令查找文件
Feb 07 面试题
介绍一下linux文件系统分配策略
Feb 25 面试题
一套软件开发工程师笔试题
May 18 面试题
EJB与JAVA BEAN的区别
Aug 29 面试题
DTD的含义以及作用
Jan 26 面试题
建龙钢铁面试总结
Apr 15 面试题
Delphi工程师笔试题
Sep 21 面试题
网上常见的一份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 str_replace的替换漏洞
2008/03/15 PHP
php基础学习之变量的使用
2011/06/09 PHP
Discuz7.2版的faq.php SQL注入漏洞分析
2014/08/06 PHP
ThinkPHP5.0 图片上传生成缩略图实例代码说明
2018/06/20 PHP
Extjs学习笔记之三 extjs form更多的表单项
2010/01/07 Javascript
jquery简单的拖动效果实现原理及示例
2013/07/26 Javascript
HTML+CSS+JS实现完美兼容各大浏览器的TABLE固定列
2015/04/26 Javascript
自己动手写的javascript前端等待控件
2015/10/30 Javascript
Json解析的方法小结
2016/06/22 Javascript
jQuery实现的placeholder效果完整实例
2016/08/02 Javascript
Bootstrap modal使用及点击外部不消失的解决方法
2016/12/13 Javascript
JS实现页面中所有img对象添加onclick事件及新窗口查看图片的方法
2016/12/27 Javascript
实例解析js中try、catch、finally的执行规则
2017/02/24 Javascript
老生常谈javascript中逻辑运算符&&和||的返回值问题
2017/04/13 Javascript
原生JavaScript实现精美的淘宝轮播图效果示例【附demo源码下载】
2017/05/27 Javascript
nodejs利用ajax实现网页无刷新上传图片实例代码
2017/06/06 NodeJs
关于页面刷新vuex数据消失问题解决方案
2017/07/03 Javascript
基于JavaScript实现百度搜索框效果
2020/06/28 Javascript
vue实现微信分享朋友圈,发送朋友的示例讲解
2018/02/10 Javascript
微信小程序--获取用户地理位置名称(无须用户授权)的方法
2019/04/29 Javascript
了解JavaScript中let语句
2019/05/30 Javascript
浅谈vuex为什么不建议在action中修改state
2020/02/02 Javascript
[49:05]OG vs Newbee 2019DOTA2国际邀请赛淘汰赛 胜者组 BO3 第二场 8.21.mp4
2020/07/19 DOTA
python实现查询IP地址所在地
2015/03/29 Python
Django与JS交互的示例代码
2017/08/23 Python
Python 关于反射和类的特殊成员方法
2017/09/14 Python
Python使用cx_Oracle模块操作Oracle数据库详解
2018/05/07 Python
用Anaconda安装本地python包的方法及路径问题(图文)
2019/07/16 Python
Python如何根据时间序列数据作图
2020/05/12 Python
django 解决扩展自带User表遇到的问题
2020/05/14 Python
什么是规则表达式
2012/05/03 面试题
计算机应用职专应届生求职信
2013/11/12 职场文书
年会搞笑主持词
2014/03/27 职场文书
小学数学教学经验交流材料
2014/05/22 职场文书
经典演讲稿开场白
2014/08/25 职场文书
使用Selenium实现微博爬虫(预登录、展开全文、翻页)
2021/04/13 Python