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

面试题 相关文章推荐
怎样创建、运行java程序
Aug 01 面试题
C语言怎样定义和声明全局变量和函数最好
Nov 26 面试题
第二层交换机和路由器的区别?第三层交换机和路由器的区别?
May 23 面试题
了解AppleTalk协议吗
Apr 01 面试题
介绍一下MD5加密算法
Nov 12 面试题
什么是虚拟内存?虚拟内存有什么优势?
Feb 19 面试题
如何整合JQuery和Prototype
Jan 31 面试题
Prototype如何为一个Ajax添加一个参数
Dec 06 面试题
若通过ObjectOutputStream向一个文件中多次以追加方式写入object,为什么用ObjectInputStream读取这些object时会产生StreamCorruptedException?
Oct 17 面试题
Set里的元素是不能重复的,那么用什么方法来区分重复与否呢?
Aug 18 面试题
JAVA中运算符的分类及举例
Sep 12 面试题
Java基础类库面试题
Sep 04 面试题
网上常见的一份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
AMFPHP php远程调用(RPC, Remote Procedure Call)工具 快速入门教程
2010/05/10 PHP
php出现web系统多域名登录失败的解决方法
2014/09/30 PHP
跨浏览器PHP下载文件名中的中文乱码问题解决方法
2015/03/05 PHP
php实现过滤UBB代码的类
2015/03/12 PHP
php打乱数组二维数组多维数组的简单实例
2016/06/17 PHP
PHP实现微信提现功能
2018/09/30 PHP
Yii 实现数据加密和解密
2021/03/09 PHP
php与js的区别是什么
2013/08/05 Javascript
javascript 控制input只允许输入的各种指定内容
2014/06/19 Javascript
javascript模拟实现ajax加载框实例
2014/10/15 Javascript
Node.js和MongoDB实现简单日志分析系统
2015/04/25 Javascript
jQuery实现表单步骤流程导航代码分享
2015/08/28 Javascript
TinyMCE汉化及本地上传图片功能实例详解
2016/05/31 Javascript
Jquery组件easyUi实现表单验证示例
2016/08/23 Javascript
Websocket协议详解及简单实例代码
2016/12/12 Javascript
微信小程序整合使用富文本编辑器的方法详解
2019/04/25 Javascript
vue中使用v-model完成组件间的通信
2019/08/22 Javascript
layui表格分页 记录勾选的实例
2019/09/02 Javascript
Vue + ts实现轮播插件的示例
2020/11/10 Javascript
js实现滚动条自动滚动
2020/12/13 Javascript
[20:39]DOTA2-DPC中国联赛 正赛开幕式 1月18日
2021/03/11 DOTA
python实现按任意键继续执行程序
2016/12/30 Python
Pandas:DataFrame对象的基础操作方法
2018/06/07 Python
GDAL 矢量属性数据修改方式(python)
2020/03/10 Python
可视化pytorch 模型中不同BN层的running mean曲线实例
2020/06/24 Python
在Pytorch中使用Mask R-CNN进行实例分割操作
2020/06/24 Python
python3中编码获取网页的实例方法
2020/11/16 Python
韩语专业本科生求职信
2013/10/01 职场文书
计算机应用专业学生的自我评价分享
2013/11/03 职场文书
求职自荐信
2013/12/14 职场文书
医药代表个人求职信范本
2013/12/19 职场文书
婚前保证书
2014/04/29 职场文书
2014国庆节标语口号
2014/09/19 职场文书
学习普通话的体会
2014/11/07 职场文书
毕业生对母校寄语
2015/02/26 职场文书
导游词之西江千户苗寨
2019/12/24 职场文书