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

面试题 相关文章推荐
大整数数相乘的问题
Jul 22 面试题
阿里巴巴的Oracle DBA笔试题答案-SQL tuning类
Apr 03 面试题
如果一个类实现了多个接口但是这些接口有相同的方法名将会怎样
Jun 16 面试题
网络体系结构及协议的定义
Mar 13 面试题
抽象类和接口的区别
Sep 19 面试题
internal修饰符起什么作用
Dec 16 面试题
Windows和Linux动态库应用异同
Apr 17 面试题
一套软件测试笔试题
Jul 25 面试题
如果Session Bean得Remove方法一直都不被调用会怎么样
Jul 14 面试题
启动一个线程是用run()还是start()
Dec 25 面试题
现在输入n个数字,以逗号,分开;然后可选择升或者降序排序;按提交键就在另一页面显示按什么排序,结果为,提供reset
Nov 09 面试题
三个Unix的命令面试题
Apr 12 面试题
网上常见的一份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
PHP4与PHP3中一个不兼容问题的解决方法
2006/10/09 PHP
phpmailer简单发送邮件的方法(附phpmailer源码下载)
2016/06/13 PHP
js 方法实现返回多个数据的代码
2009/04/30 Javascript
window.event快达到全浏览器支持了,以后使用就方便了
2011/11/30 Javascript
javascript中方便增删改cookie的一个类
2012/10/11 Javascript
JS关键字变色实现思路及代码
2013/02/21 Javascript
用Javascript来生成ftp脚本的小例子
2013/07/03 Javascript
Javascript:为input设置readOnly属性(示例讲解)
2013/12/25 Javascript
用js将内容复制到剪贴板兼容浏览器
2014/03/18 Javascript
js怎么判断flash swf文件是否加载完毕
2014/08/14 Javascript
jquery实现表格本地排序的方法
2015/03/11 Javascript
JS动态修改iframe高度和宽度的方法
2015/04/01 Javascript
Javascript数组Array方法解读
2016/03/13 Javascript
基于javascript实现句子翻牌网页版小游戏
2016/03/23 Javascript
详解VUE的状态控制与延时加载刷新
2017/03/27 Javascript
JS实现标签页切换效果
2017/05/04 Javascript
layer弹出层 iframe层去掉滚动条的实例代码
2018/08/17 Javascript
Python初学时购物车程序练习实例(推荐)
2017/08/08 Python
python中itertools模块zip_longest函数详解
2018/06/12 Python
关于Numpy中的行向量和列向量详解
2019/11/30 Python
Python使用Pyqt5实现简易浏览器(最新版本测试过)
2020/04/27 Python
Python图像处理之膨胀与腐蚀的操作
2021/02/07 Python
Python操作Excel的学习笔记
2021/02/18 Python
手摸手教你用canvas实现给图片添加平铺水印的实现
2019/08/20 HTML / CSS
Banana Republic欧盟:美国都市简约风格的代表品牌
2018/05/09 全球购物
老板电器官方购物商城:老板油烟机、燃气灶、消毒柜、电烤箱
2018/05/30 全球购物
美国温暖商店:The Warming Store
2018/12/15 全球购物
土木工程专业自荐信
2013/10/04 职场文书
初中三好学生事迹材料
2014/01/13 职场文书
七年级音乐教学反思
2014/01/26 职场文书
2014红色之旅心得体会
2014/10/07 职场文书
地下停车场租赁协议范本
2014/10/07 职场文书
自愿离婚协议书范本
2015/01/26 职场文书
创业计划书之甜品店
2019/09/18 职场文书
MySQL约束超详解
2021/09/04 MySQL
Redis实战之Lettuce的使用技巧详解
2022/12/24 Redis