一些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中如何创建和修改数组
May 02 面试题
PHP如何删除一个Cookie值
Nov 15 面试题
Yahoo-PHP面试题2
Dec 06 面试题
如何启动时不需输入用户名与密码
May 09 面试题
数据库连接池的工作原理
Sep 26 面试题
C语言面试题
May 19 面试题
C#可否对内存进行直接的操作
Feb 26 面试题
通用C#笔试题附答案
Nov 26 面试题
Linux如何命名文件--使用文件名时应注意
May 29 面试题
斯福泰克软件测试面试题
Feb 16 面试题
Prototype如何实现页面局部定时刷新
Aug 06 面试题
掌上明珠Java程序员面试总结
Feb 23 面试题
网上常见的一份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基础知识:类与对象(5) static
2006/12/13 PHP
PHP 面向对象程序设计(oop)学习笔记(三) - 单例模式和工厂模式
2014/06/12 PHP
yii权限控制的方法(三种方法)
2015/12/28 PHP
示例详解Laravel的注册重构
2016/08/14 PHP
php版微信支付api.mch.weixin.qq.com域名解析慢原因与解决方法
2016/10/12 PHP
关于__defineGetter__ 和__defineSetter__的说明
2007/05/12 Javascript
AJAX分页的代码(后台asp.net)
2011/02/14 Javascript
JavaScript格式化日期时间的方法和自定义格式化函数示例
2014/04/04 Javascript
浅析javascript 定时器
2014/12/23 Javascript
jQuery实现响应鼠标背景变化的动态菜单效果代码
2015/08/27 Javascript
jQuery绑定事件的几种实现方式
2016/05/09 Javascript
js实现表单及时验证功能 用户信息立即验证
2016/09/13 Javascript
浅谈jQuery双事件多重加载的问题
2016/10/05 Javascript
JS函数多个参数默认值指定方法分析
2016/11/28 Javascript
详解js产生对象的3种基本方式(工厂模式,构造函数模式,原型模式)
2017/01/09 Javascript
Node.js连接mongodb实例代码
2017/06/06 Javascript
vue.js使用3DES加密的方法示例
2018/05/18 Javascript
[01:03:41]完美世界DOTA2联赛PWL S3 DLG vs Phoenix 第一场 12.17
2020/12/19 DOTA
pycharm 使用心得(九)解决No Python interpreter selected的问题
2014/06/06 Python
python基于pygame实现响应游戏中事件的方法(附源码)
2015/11/11 Python
Python中__slots__属性介绍与基本使用方法
2018/09/05 Python
Python3.5 + sklearn利用SVM自动识别字母验证码方法示例
2019/05/10 Python
python创建子类的方法分析
2019/11/28 Python
HTML5 Canvas画线技巧——实现绘制一个像素宽的细线
2013/08/02 HTML / CSS
加拿大鞋子连锁店:Town Shoes
2016/09/26 全球购物
美国在线艺术商店:HandmadePiece
2020/11/06 全球购物
爱情保证书范文
2014/02/01 职场文书
加多宝凉茶广告词
2014/03/18 职场文书
高中学生期末评语
2014/04/25 职场文书
搞笑车尾标语
2014/06/23 职场文书
党的群众路线教育实践活动对照检查材料(教师)
2014/09/24 职场文书
初中英语教师个人工作总结2015
2015/07/21 职场文书
通讯稿范文
2015/07/22 职场文书
phpQuery解析HTML乱码问题(补充官网未列出的乱码解决方案)
2021/04/01 PHP
Python竟然能剪辑视频
2021/05/25 Python
海康机器人重磅发布全新算法开发平台VM4.2
2022/04/21 数码科技