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

面试题 相关文章推荐
PHP面试题-$message和$$message的区别
Dec 08 面试题
PHP笔试题
Feb 22 面试题
一份比较全的PHP面试题
Jul 29 面试题
JSF面试题:Jsf中导航的标签是什么
Apr 20 面试题
Java里面有没有全局变量?为什么?
Feb 06 面试题
怎样声明接口
Sep 19 面试题
一个SQL面试题
Aug 21 面试题
Oracle性能调优原则
May 03 面试题
亿企通软件测试面试题
Apr 10 面试题
几个MySql的面试题
Apr 22 面试题
java程序员面试交流
Nov 29 面试题
UNIX文件名称有什么规定
Mar 25 面试题
网上常见的一份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中oci8扩展
2015/06/18 PHP
YII动态模型(动态表名)支持分析
2016/03/29 PHP
php字符串的替换,分割和连接方法
2016/05/23 PHP
全面解析PHP操作Memcache基本函数
2016/07/14 PHP
php自定义函数br2nl实现将html中br换行符转换为文本输入中换行符的方法【与函数nl2br功能相反】
2017/02/17 PHP
PHP基于MySQLI函数封装的数据库连接工具类【定义与用法】
2017/08/11 PHP
javascrip客户端验证文件大小及文件类型并重置上传
2011/01/12 Javascript
JavaScript 语言基础知识点总结(思维导图)
2013/11/10 Javascript
Bootstrap入门书籍之(四)菜单、按钮及导航
2016/02/17 Javascript
JS表单验证的代码(常用)
2016/04/08 Javascript
Javascript操作表单实例讲解(下)
2016/06/20 Javascript
jQuery操作cookie
2016/08/08 Javascript
开源免费天气预报接口API及全国所有地区代码(国家气象局提供)
2016/12/26 Javascript
ES6新特性一: let和const命令详解
2017/04/20 Javascript
Koa2微信公众号开发之消息管理
2018/05/16 Javascript
VUE 直接通过JS 修改html对象的值导致没有更新到数据中解决方法分析
2019/12/02 Javascript
js实现简单的无缝轮播效果
2020/09/05 Javascript
微信小程序实现点击导航条切换页面
2020/11/19 Javascript
Python进阶之递归函数的用法及其示例
2018/01/31 Python
python跳过第一行快速读取文件内容的实例
2018/07/12 Python
Jupyter Notebook 实现正常显示中文和负号
2020/04/24 Python
python time()的实例用法
2020/11/03 Python
html特殊符号示例 html特殊字符编码对照表
2014/01/14 HTML / CSS
介绍一下SQL注入攻击的种类和防范手段
2012/02/18 面试题
施工安全协议书
2013/12/11 职场文书
《只有一个地球》教学反思
2014/02/14 职场文书
大学生演讲稿
2014/04/25 职场文书
演讲稿的写法
2014/05/19 职场文书
入党推优材料
2014/06/02 职场文书
法定代表人身份证明书(含说明)
2014/10/02 职场文书
2015年上半年计生工作总结
2015/03/30 职场文书
创业项目大全(适合在家创业的项目)
2019/08/15 职场文书
广告文案的撰写技巧(实用干货)
2019/08/23 职场文书
python实现求纯色彩图像的边框
2021/04/08 Python
MySQL优化之如何写出高质量sql语句
2021/05/17 MySQL
Python必备技巧之函数的使用详解
2022/04/04 Python