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

面试题 相关文章推荐
PHP面试题集
Dec 18 面试题
Eclipse面试题
Mar 22 面试题
JNI的定义
Nov 25 面试题
C/C++程序员常见面试题二
Nov 19 面试题
如何高效率的查找一个月以内的数据
Apr 15 面试题
三维科技面试题
Jul 27 面试题
新大陆软件面试题
Nov 24 面试题
广州某公司软件工程师面试题
Dec 22 面试题
Python面试题集
Mar 08 面试题
火山动力Java笔试题
Jun 26 面试题
介绍一下javax.servlet.Servlet接口及其主要方法
Nov 30 面试题
Java面试题冲刺第十六天--消息队列
Aug 07 面试题
网上常见的一份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导入导出excel实例
2013/10/25 PHP
使用GD库生成带阴影文字的图片
2015/03/27 PHP
php返回当前日期或者指定日期是周几
2015/05/21 PHP
JQuery事件e参数的方法preventDefault()取消默认行为
2013/09/26 Javascript
FF(火狐)浏览器无法执行window.close()解决方案
2014/11/13 Javascript
AngularJS中的模块详解
2015/01/29 Javascript
jQuery实现输入框下拉列表树插件特效代码分享
2015/08/27 Javascript
javascript类型系统——undefined和null全面了解
2016/07/13 Javascript
js获取当前时间(昨天、今天、明天)
2016/11/23 Javascript
浅谈Node.js:理解stream
2016/12/08 Javascript
解析ajaxFileUpload 异步上传文件简单使用
2016/12/30 Javascript
使用jquery判断一个元素是否含有一个指定的类(class)实例
2017/02/12 Javascript
bootstrap实现动态进度条效果
2017/03/08 Javascript
利用JS判断客户端类型你应该知道的四种方法
2017/12/22 Javascript
js实现微信/QQ直接跳转到支付宝APP打开口令领红包功能
2018/01/09 Javascript
监听angularJs列表数据是否渲染完毕的方法示例
2018/11/07 Javascript
详解ES6 Fetch API HTTP请求实用指南
2018/11/14 Javascript
webpack file-loader和url-loader的区别
2019/01/15 Javascript
NodeJs之word文件生成与解析的实现代码
2019/04/01 NodeJs
jquery获取并修改触发事件的DOM元素示例【基于target 属性】
2019/10/10 jQuery
javascript/jquery实现点击触发事件的方法分析
2019/11/11 jQuery
微信JSSDK实现打开摄像头拍照再将相片保存到服务器
2019/11/15 Javascript
[04:47]DOTA2-潍坊风行电子俱乐部探秘
2014/08/08 DOTA
[01:13]2015国际邀请赛线下观战现场
2015/08/08 DOTA
python安装以及IDE的配置教程
2015/04/29 Python
Python的Flask框架标配模板引擎Jinja2的使用教程
2016/07/12 Python
python中如何正确使用正则表达式的详细模式(Verbose mode expression)
2017/11/08 Python
使用python实现抓取腾讯视频所有电影的爬虫
2019/04/15 Python
python opencv图片编码为h264文件的实例
2019/12/12 Python
tensorflow 实现数据类型转换
2020/02/17 Python
Unix里面如何在后台运行程序
2016/10/14 面试题
学生党员公开承诺书
2014/05/28 职场文书
列车乘务员工作不细心检讨书
2014/10/07 职场文书
2015年秋季校长开学典礼致辞
2015/07/29 职场文书
spring注解 @PropertySource配置数据源全流程
2022/03/25 Java/Android
利用nginx搭建RTMP视频点播、直播、HLS服务器
2022/05/25 Servers