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

面试题 相关文章推荐
如何强制垃圾回收
Oct 06 面试题
JAVA和C++的区别
Oct 06 面试题
extern在函数声明中是什么意思
Jan 19 面试题
写一个函数,求一个字符串的长度。在main函数中输入字符串,并输出其长度
Nov 18 面试题
在使用非全零作为空指针内部表达的机器上, NULL是如何定义
Nov 09 面试题
广州一家公司的.NET面试题
Jun 11 面试题
测试时代收集的软件测试面试题
Sep 25 面试题
如何反序的迭代一个序列?how do I iterate over a sequence in reverse order
Feb 04 面试题
Java如何获得ResultSet的总行数
Sep 03 面试题
Java程序员面试题
Sep 27 面试题
怎样声明一个匿名的内部类
Jun 01 面试题
德尔福集团DELPHI的笔试题
Feb 22 面试题
网上常见的一份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侧拉菜单 漂亮,可以向右或者向左展开,支持FF,IE
2009/10/15 PHP
理解php原理的opcodes(操作码)
2010/10/26 PHP
PHP Warning: PHP Startup: Unable to load dynamic library \ D:/php5/ext/php_mysqli.dll\
2012/06/17 PHP
javascript form 验证函数 弹出对话框形式
2009/06/23 Javascript
一个简单的javascript类定义例子
2009/09/12 Javascript
js内存泄露的几种情况详细探讨
2013/05/31 Javascript
javascript 实现键盘上下左右功能的小例子
2013/09/15 Javascript
showModalDialog模态对话框的使用详解以及浏览器兼容
2014/01/11 Javascript
jQuery实现tab选项卡效果的方法
2015/07/08 Javascript
浅谈JavaScript的push(),pop(),concat()方法
2016/06/03 Javascript
浅谈JavaScript中的this指针和引用知识
2016/08/05 Javascript
JavaScript实现输入框与清空按钮联动效果
2016/09/09 Javascript
jQuery ajax MD5实现用户注册即时验证功能
2016/10/11 Javascript
vuejs开发组件分享之H5图片上传、压缩及拍照旋转的问题处理
2017/03/06 Javascript
使用 Vue.js 仿百度搜索框的实例代码
2017/05/09 Javascript
基于ExtJs在页面上window再调用Window的事件处理方法
2017/07/26 Javascript
js学习总结之DOM2兼容处理顺序问题的解决方法
2017/07/27 Javascript
基于js中style.width与offsetWidth的区别(详解)
2017/11/12 Javascript
vue-cli 使用vue-bus来全局控制的实例讲解
2018/09/15 Javascript
使用VScode 插件debugger for chrome 调试react源码的方法
2019/09/13 Javascript
Openlayers显示地理位置坐标的方法
2020/09/28 Javascript
[00:32]2018DOTA2亚洲邀请赛Newbee出场
2018/04/03 DOTA
[57:37]EG vs Mineski 2018国际邀请赛小组赛BO2 第二场 8.16
2018/08/17 DOTA
用Python写王者荣耀刷金币脚本
2017/12/21 Python
Python使用pip安装报错:is not a supported wheel on this platform的解决方法
2018/01/23 Python
python实现两个文件夹的同步
2019/08/29 Python
python进行OpenCV实战之画图(直线、矩形、圆形)
2020/08/27 Python
Python如何在bool函数中取值
2020/09/21 Python
使用SVG实现提示框功能的示例代码
2020/06/05 HTML / CSS
美国排名第一的葡萄酒俱乐部:Firstleaf Wine Club
2020/01/02 全球购物
致接力运动员广播稿
2014/02/17 职场文书
基层党组织建设整改方案
2014/09/16 职场文书
电台广播稿范文
2015/08/19 职场文书
Python中 range | np.arange | np.linspace三者的区别
2022/03/22 Python
简单聊聊Golang中defer预计算参数
2022/03/25 Golang
【海涛教你打DOTA】黑鸟第一视角解说
2022/04/01 DOTA