一些Solaris面试题


Posted in 面试题 onDecember 22, 2015
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...

面试题 相关文章推荐
局部内部类是否可以访问非final变量?
Apr 20 面试题
寻找迷宫的一条出路,o通路;X:障碍
Jul 10 面试题
计算s=f(f(-1.4))的值
May 06 面试题
什么是Smart Navigation?
Jul 03 面试题
可靠的数据流传输TCP
Mar 15 面试题
linux面试题参考答案(10)
Oct 26 面试题
中科软测试工程师面试题
Jun 16 面试题
软件测试题目
Feb 27 面试题
介绍一下EJB的分类及其各自的功能及应用
Aug 23 面试题
EJB3.1都有哪些改进
Nov 17 面试题
写clone()方法时,通常都有一行代码,是什么?
Oct 31 面试题
如何安装ruby on rails
Feb 09 面试题
网上常见的一份Linux面试题(多项选择部分)
Sep 09 #面试题
常用UNIX 命令(Linux的常用命令)
Dec 26 #面试题
如何开启linux的ssh服务
Feb 14 #面试题
Shell编程面试题
May 29 #面试题
如何进行Linux分区优化
Sep 13 #面试题
一些Unix笔试题和面试题
Sep 25 #面试题
某/etc/fstab文件中的某行如下: /dev/had5 /mnt/dosdata msdos defaults,usrquota 1 2 请解释其含义
Apr 11 #面试题
You might like
详解:――如何将图片储存在数据库里
2006/12/05 PHP
PHP扩展CURL的用法详解
2014/06/20 PHP
php从csv文件读取数据并输出到网页的方法
2015/03/14 PHP
php基于PDO连接MSSQL示例DEMO
2016/07/13 PHP
详解Yii实现分页的两种方法
2017/01/14 PHP
myEvent.js javascript跨浏览器事件框架
2011/10/24 Javascript
JQuery学习笔录 简单的JQuery
2012/04/09 Javascript
JQuery实现简单时尚快捷的气泡提示插件
2012/12/20 Javascript
Egret引擎开发指南之创建项目
2014/09/03 Javascript
js实现继承的5种方式
2015/12/01 Javascript
使用JS实现图片展示瀑布流效果的实例代码
2016/09/12 Javascript
浅谈js数组和splice的用法
2016/12/04 Javascript
QRCode.js:基于JQuery的生成二维码JS库的使用
2017/06/23 jQuery
微信小程序下拉刷新界面的实现
2017/09/28 Javascript
详解package.json版本号规则
2019/08/01 Javascript
JavaScript字符串处理常见操作方法小结
2019/11/15 Javascript
详解为element-ui的Select和Cascader添加弹层底部操作按钮
2020/02/07 Javascript
vue实现用户长时间不操作自动退出登录功能的实现代码
2020/07/23 Javascript
微信小程序自定义胶囊样式
2020/12/27 Javascript
Python设计实现的计算器功能完整实例
2017/08/18 Python
pycharm重置设置,恢复默认设置的方法
2018/10/22 Python
Pyqt5 实现跳转界面并关闭当前界面的方法
2019/06/19 Python
Python实现栈和队列的简单操作方法示例
2019/11/29 Python
python学习之使用Matplotlib画实时的动态折线图的示例代码
2021/02/25 Python
HTML5 实现一个访问本地文件的实例
2012/12/13 HTML / CSS
德国婴儿服装和婴儿用品购买网站:Baby Sweets
2019/12/08 全球购物
早晨薰衣草在线女性精品店:Morning Lavender
2021/01/04 全球购物
什么是servlet
2012/05/08 面试题
汽车销售顾问求职自荐信
2014/01/01 职场文书
租赁意向书范本
2014/04/01 职场文书
岗位安全生产责任书
2014/07/28 职场文书
2014年机关工会工作总结
2014/12/19 职场文书
2016形势与政策学习心得体会
2016/01/12 职场文书
24句精辟的现实社会语录,句句扎心,道尽人性
2019/08/29 职场文书
关于mysql中时间日期类型和字符串类型的选择
2021/11/27 MySQL
Win11运行cmd提示“请求的操作需要提升”的两种解决方法
2022/07/07 数码科技