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

面试题 相关文章推荐
如何提高JDBC的性能
Apr 30 面试题
如何高效率的查找一个月以内的数据
Apr 15 面试题
北京泡泡网网络有限公司.net面试题
Jul 17 面试题
什么是网络协议
Apr 07 面试题
渗透攻击的测试步骤
Jun 07 面试题
局域网标准
Sep 10 面试题
常用UNIX 命令(Linux的常用命令)
Dec 26 面试题
介绍一下Linux文件的记录形式
Sep 29 面试题
Linux管理员面试题 Linux admin interview questions
Nov 01 面试题
瀑布模型都有哪些优缺点
Jun 23 面试题
Java Servlet的主要功能和作用是什么
Feb 14 面试题
SOA面试题:如何在SOA中实现松耦合
Jul 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
destoon二次开发入门示例
2014/06/20 PHP
PHP实现通过中文字符比率来判断垃圾评论的方法
2014/10/20 PHP
php jsonp单引号转义
2014/11/23 PHP
PHP+APACHE实现网址伪静态
2015/02/22 PHP
PHP多个图片压缩成ZIP的方法
2020/08/18 PHP
ThinkPHP5.0框架使用build 自动生成模块操作示例
2019/04/11 PHP
Firefox window.close()的使用注意事项
2009/04/11 Javascript
JQUBar 基于JQUERY的柱状图插件
2010/11/23 Javascript
javascript中文本框中输入法切换的问题
2013/12/10 Javascript
js/jQuery简单实现选项卡功能
2014/01/02 Javascript
动态的绑定事件addEventListener方法的使用
2014/01/24 Javascript
JavaScript日期时间格式化函数分享
2014/05/05 Javascript
IE10中flexigrid无法显示数据的解决方法
2015/07/26 Javascript
解决JS请求服务器gbk文件乱码的问题
2015/10/16 Javascript
JavaScript中Function函数与Object对象的关系
2015/12/17 Javascript
由简入繁实现Jquery树状结构的方法(推荐)
2016/06/10 Javascript
js简单正则验证汉字英文及下划线的方法
2016/11/28 Javascript
jQuery实现手机上输入后隐藏键盘功能
2017/01/04 Javascript
JS验证不重复验证码
2017/02/10 Javascript
Input文本框随着输入内容多少自动延伸的实现
2017/02/15 Javascript
浅谈Node.js 子进程与应用场景
2018/01/24 Javascript
vue 引用自定义ttf、otf、在线字体的方法
2019/05/09 Javascript
JavaScript实现电灯开关小案例
2020/03/30 Javascript
Python简单日志处理类分享
2015/02/14 Python
Python实现简单拆分PDF文件的方法
2015/07/30 Python
pip matplotlib报错equired packages can not be built解决
2018/01/06 Python
python爬虫基本知识
2018/03/05 Python
Python 读取某个目录下所有的文件实例
2018/06/23 Python
Python定时任务sched模块用法示例
2018/07/16 Python
Python之Django自动实现html代码(下拉框,数据选择)
2020/03/13 Python
如何在python中处理配置文件代码实例
2020/09/27 Python
使用CSS3配合IE滤镜实现渐变和投影的效果
2015/09/06 HTML / CSS
白血病捐款倡议书
2014/05/14 职场文书
学校标语口号大全
2015/12/26 职场文书
python 判断文件或文件夹是否存在
2022/03/18 Python
我家女友可不止可爱呢 公开OP主题曲无字幕动画MV
2022/04/11 日漫