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

面试题 相关文章推荐
名词解释WEB SERVICE,SOAP,UDDI,WSDL,JAXP,JAXM;JSWDL开发包的介绍。
Oct 27 面试题
枚举与#define宏的区别
Apr 30 面试题
杭州SQL浙江浙大网新恩普软件有限公司
Jul 27 面试题
Oracle的内存结构(Memory structures)
Jun 10 面试题
如何选择使用结构还是类
May 30 面试题
一些Unix笔试题和面试题
Jan 22 面试题
Shell如何接收变量输入
Sep 24 面试题
你经历的项目中的SCM配置项主要有哪些?什么是配置项?
Nov 04 面试题
客服端调用EJB对象的几个基本步骤
Jan 15 面试题
介绍一下如何优化MySql
Dec 20 面试题
JAVA高级程序员面试题
Sep 06 面试题
介绍一下你对SOA的认识
Apr 24 面试题
网上常见的一份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针对常规模板引擎中与CSS/JSON冲突的解决方法
2014/08/19 PHP
推荐25款php中非常有用的类库
2014/09/29 PHP
php绘图之加载外部图片的方法
2015/01/24 PHP
php字符串函数学习之substr()
2015/03/27 PHP
thinkPHP js文件中U方法不被解析问题的解决方法
2016/12/05 PHP
详解yii2实现分库分表的方案与思路
2017/02/03 PHP
解决 FireFox 下[使用event很麻烦] 的问题.
2006/08/22 Javascript
htm调用JS代码
2007/03/15 Javascript
javascript DOM编程实例(智播客学习)
2009/11/23 Javascript
Javacript实现颜色梯度变化和渐变的效果代码
2013/05/31 Javascript
jquery查找tr td 示例模拟
2014/05/08 Javascript
使用AngularJS实现可伸缩的页面切换的方法
2015/06/19 Javascript
ajax跨域调用webservice的实现代码
2016/05/09 Javascript
全面理解闭包机制
2016/07/11 Javascript
JS简单获取客户端IP地址的方法【调用搜狐接口】
2016/09/05 Javascript
Vue监听数据对象变化源码
2017/03/09 Javascript
关于TypeScript模块导入的那些事
2018/06/12 Javascript
js继承的这6种方式!(上)
2019/04/23 Javascript
vue前后分离调起微信支付
2019/07/29 Javascript
微信小程序动态添加和删除组件的现实
2020/02/28 Javascript
Vue项目打包压缩的实现(让页面更快响应)
2020/03/10 Javascript
使用JavaScript和MQTT开发物联网应用示例解析
2020/08/07 Javascript
Python查找相似单词的方法
2015/03/05 Python
Python应用03 使用PyQT制作视频播放器实例
2016/12/07 Python
Python3.5内置模块之os模块、sys模块、shutil模块用法实例分析
2019/04/27 Python
pyqt 多窗口之间的相互调用方法
2019/06/19 Python
Python3.5 win10环境下导入kera/tensorflow报错的解决方法
2019/12/19 Python
python为Django项目上的每个应用程序创建不同的自定义404页面(最佳答案)
2020/03/09 Python
Opencv常见图像格式Data Type及代码实例
2020/11/02 Python
python 基于UDP协议套接字通信的实现
2021/01/22 Python
玩具反斗城西班牙网上商城:ToysRUs西班牙
2017/01/19 全球购物
SheIn沙特阿拉伯:女装在线
2020/03/23 全球购物
如何进行Linux分区优化
2016/09/13 面试题
sql server删除前1000行数据的方法实例
2021/08/30 SQL Server
php实现自动生成验证码的实例讲解
2021/11/17 PHP
Golang bufio详细讲解
2022/04/21 Golang