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

面试题 相关文章推荐
介绍一下.net和Java的特点和区别
Sep 26 面试题
System.Array.CopyTo()和System.Array.Clone()有什么区别
Jun 20 面试题
C#笔试题集合
Jun 21 面试题
介绍一下Linux中的链接
May 28 面试题
如果Session Bean得Remove方法一直都不被调用会怎么样
Jul 14 面试题
String s = new String(“xyz”);创建了几个String Object?
Aug 05 面试题
若通过ObjectOutputStream向一个文件中多次以追加方式写入object,为什么用ObjectInputStream读取这些object时会产生StreamCorruptedException?
Oct 17 面试题
类的返射机制中的包及核心类
Sep 12 面试题
编程用JAVA解析XML的方式
Jul 07 面试题
Java中的基本数据类型所占存储空间大小固定的吗
Feb 15 面试题
金鑫耀Java笔试题
Sep 06 面试题
与UNIX有关的几个名词
Sep 17 面试题
网上常见的一份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
PHP源码之 ext/mysql扩展部分
2009/07/17 PHP
php更改目录及子目录下所有的文件后缀扩展名的代码
2010/10/12 PHP
从零开始学YII2框架(五)快速生成代码工具 Gii 的使用
2014/08/20 PHP
Dwz与thinkphp整合下的数据导出到Excel实例
2014/12/04 PHP
php读取文件内容的方法汇总
2015/01/24 PHP
php根据日期显示所在星座的方法
2015/07/13 PHP
PHP快速导出百万级数据到CSV或者EXCEL文件
2020/11/27 PHP
JQuery获取元素文档大小、偏移和位置和滚动条位置的方法集合
2010/01/12 Javascript
Javascript 八进制转义字符(8进制)
2011/04/08 Javascript
Jquery读取URL参数小例子
2013/08/30 Javascript
javascript对下拉列表框(select)的操作实例讲解
2013/11/29 Javascript
jquery.map()方法的使用详解
2015/07/09 Javascript
jQuery实现带幻灯的tab滑动切换风格菜单代码
2015/08/27 Javascript
常用jQuery选择器汇总
2017/02/02 Javascript
jQuery使用JSONP实现跨域获取数据的三种方法详解
2017/05/04 jQuery
AngularJS下$http服务Post方法传递json参数的实例
2018/03/29 Javascript
JS左右无缝轮播功能完整实例
2019/05/16 Javascript
vue集成kindeditor富文本的实现示例代码
2019/06/07 Javascript
Vue分页插件的前后端配置与使用
2019/10/09 Javascript
JavaScript实现答题评分功能页面
2020/06/24 Javascript
[00:32]2018DOTA2亚洲邀请赛Mineski出场
2018/04/04 DOTA
[01:02:18]VGJ.S vs infamous Supermajor 败者组 BO3 第一场 6.4
2018/06/05 DOTA
Python 命令行参数sys.argv
2008/09/06 Python
利用python获取Ping结果示例代码
2017/07/06 Python
python入门教程 python入门神图一张
2018/03/05 Python
python爬取足球直播吧五大联赛积分榜
2018/06/13 Python
python try except 捕获所有异常的实例
2018/10/18 Python
Python爬取商家联系电话以及各种数据的方法
2018/11/10 Python
安装pyinstaller遇到的各种问题(小结)
2020/11/20 Python
Linden Leaves官网:新西兰纯净护肤品
2020/12/20 全球购物
Collection和Collections的区别
2016/05/02 面试题
营业经理岗位职责
2013/11/10 职场文书
汽车销售员如何做职业生涯规划
2014/02/16 职场文书
市场营销毕业求职信
2014/08/07 职场文书
apache基于端口创建虚拟主机的示例
2021/04/24 Servers
postgresql无序uuid性能测试及对数据库的影响
2021/06/11 PostgreSQL