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

面试题 相关文章推荐
xml有哪些解析技术?区别是什么
Apr 26 面试题
Android笔试题总结
Nov 29 面试题
介绍一下代理模式(Proxy)
Oct 17 面试题
北京泡泡网网络有限公司.net面试题
Jul 17 面试题
.NET笔试题(20个问题)
Feb 02 面试题
介绍一下.NET构架下remoting和webservice
May 08 面试题
什么是三层交换,说说和路由的区别在那里
Sep 01 面试题
C#如何调用Windows程序打开一个文档
Dec 26 面试题
LINUX下线程,GDI类的解释
Apr 17 面试题
说一下Linux下有关用户和组管理的命令
Jan 04 面试题
设计4个线程,其中两个线程每次对j增加1,另外两个线程对j每次减少1。写出程序。
Dec 30 面试题
swtich是否能作用在byte上,是否能作用在long上,是否能作用在String上?
Mar 30 面试题
网上常见的一份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
教你IIS6的PHP最佳配置方法
2006/09/05 PHP
PHP导出MySQL数据到Excel文件(fputcsv)
2011/07/03 PHP
PHP中spl_autoload_register()和__autoload()区别分析
2014/05/10 PHP
用js实现手把手教你月入万刀(转贴)
2007/11/07 Javascript
jquery 与NVelocity 产生冲突的解决方法
2011/06/13 Javascript
JavaScript实现QueryString获取GET参数的方法
2013/07/02 Javascript
window.open()详解及浏览器兼容性问题示例探讨
2014/05/29 Javascript
推荐一个封装好的getElementsByClassName方法
2014/12/02 Javascript
基于javascript实现页面加载loading效果
2020/09/15 Javascript
js数组常用操作方法小结(增加,删除,合并,分割等)
2016/08/02 Javascript
AngularJS中过滤器的使用与自定义实例代码
2016/09/17 Javascript
简单的jQuery拖拽排序效果的实现(增强动态)
2017/02/09 Javascript
JS加密插件CryptoJS实现的Base64加密示例
2020/08/16 Javascript
浅析js中mvvm模式实现的原理
2018/10/06 Javascript
js module大战
2019/04/19 Javascript
JS实现商城秒杀倒计时功能(动态设置秒杀时间)
2019/12/12 Javascript
python写的ARP攻击代码实例
2014/06/04 Python
python 远程统计文件代码分享
2015/05/14 Python
python 爬取学信网登录页面的例子
2019/08/13 Python
Python3 使用pillow库生成随机验证码
2019/08/26 Python
python实现异常信息堆栈输出到日志文件
2019/12/26 Python
解决django无法访问本地static文件(js,css,img)网页里js,cs都加载不了
2020/04/07 Python
python数据分析工具之 matplotlib详解
2020/04/09 Python
python print 格式化输出,动态指定长度的实现
2020/04/12 Python
国际知名设计师时装商店:Coggles
2016/09/05 全球购物
中国排名第一的外贸销售网站:LightInTheBox.com(兰亭集势)
2016/10/28 全球购物
英国最受欢迎的价格比较网站之一:MoneySuperMarket
2018/12/19 全球购物
迪斯尼假期(欧洲、中东及非洲):Disney Holidays EMEA
2021/02/15 全球购物
企业治理工作自我评价
2013/09/26 职场文书
卫生系统先进事迹
2014/05/13 职场文书
校园标语大全
2014/06/19 职场文书
开展党的群众路线教育实践活动情况汇报
2014/11/05 职场文书
体育教师研修感悟
2015/11/18 职场文书
《学会看病》教学反思
2016/02/17 职场文书
Redis 的查询很快的原因解析及Redis 如何保证查询的高效
2022/03/16 Redis
MySQL分区表管理命令汇总
2022/03/21 MySQL