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

面试题 相关文章推荐
Java提供了哪些企业应用编程接口
Feb 13 面试题
main 函数执行以前,还会执行什么代码
Apr 17 面试题
C语言编程练习
Apr 02 面试题
数据库专业英语
Nov 30 面试题
关于VPN
Jun 10 面试题
介绍一下linux文件系统分配策略
Feb 25 面试题
Linux常见面试题
Mar 18 面试题
Python如何实现单例模式
Jun 03 面试题
华为python面试题
May 03 面试题
AssertionError 跟一下那个类是 “is – a”的关系
Feb 21 面试题
Ejb技术面试题
Apr 29 面试题
UNIX文件名称有什么规定
Mar 25 面试题
网上常见的一份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生成静态页面教程
2012/01/10 PHP
thinkphp缓存技术详解
2014/12/09 PHP
thinkphp3.2实现上传图片的控制器方法
2016/04/28 PHP
laravel5创建service provider和facade的方法详解
2016/07/26 PHP
thinkPHP中验证码的简单实现方法
2016/12/05 PHP
PHP用PDO如何封装简单易用的DB类详解
2017/07/30 PHP
JavaScript 事件对象的实现
2009/07/13 Javascript
JavaScript中“+”的陷阱深刻理解
2012/12/04 Javascript
js网页实时倒计时精确到秒级
2014/02/10 Javascript
jQuery实现级联菜单效果(仿淘宝首页菜单动画)
2014/04/10 Javascript
JS实现状态栏跑马灯文字效果代码
2015/10/24 Javascript
BootStrap中Table分页插件使用详解
2016/10/09 Javascript
connection reset by peer问题总结及解决方案
2016/10/21 Javascript
详解AngularJS验证、过滤器、指令
2017/01/04 Javascript
js 简易版滚动条实例(适用于移动端H5开发)
2017/06/26 Javascript
[02:42]2014DOTA2国际邀请赛 三冰专访:我会打到Ti20
2014/07/13 DOTA
[52:29]DOTA2上海特级锦标赛主赛事日 - 2 胜者组第一轮#3Secret VS OG第三局
2016/03/03 DOTA
详解python单例模式与metaclass
2016/01/15 Python
Python在cmd上打印彩色文字实现过程详解
2019/08/07 Python
tensorflow 固定部分参数训练,只训练部分参数的实例
2020/01/20 Python
Python如何把字典写入到CSV文件的方法示例
2020/08/23 Python
基于Python-turtle库绘制路飞的草帽骷髅旗、美国队长的盾牌、高达的源码
2021/02/18 Python
DJI大疆德国官方商城:大疆无人机
2018/09/01 全球购物
公务员培训自我鉴定
2014/02/01 职场文书
生日寄语大全
2014/04/08 职场文书
厂区绿化方案
2014/05/08 职场文书
物业管理专业求职信
2014/06/11 职场文书
优秀纪检干部材料
2014/08/27 职场文书
个人授权委托书格式
2014/08/30 职场文书
委托书的写法
2014/08/30 职场文书
质量在我心中演讲稿
2014/09/02 职场文书
2015年秋季校长开学典礼致辞
2015/07/29 职场文书
2016年过年放假安排通知
2015/08/18 职场文书
安全生产学习心得体会
2016/01/18 职场文书
2016春季运动会开幕词
2016/03/04 职场文书
公司要求试用期员工提交“述职报告”,该怎么写?
2019/07/17 职场文书