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

面试题 相关文章推荐
Linux中如何设置Java环境变量(Ubuntu)
Jul 24 面试题
.net笔试题
Mar 03 面试题
如何保障Web服务器安全
May 05 面试题
Linux如何压缩可执行文件
Oct 21 面试题
一些Unix笔试题和面试题
Sep 25 面试题
Linux的文件类型
Mar 07 面试题
EJB包括(SessionBean,EntityBean)说出他们的生命周期,及如何管理事务的?
Feb 17 面试题
GC是什么?为什么要有GC?
Dec 08 面试题
西安夏日科技有限公司Java笔试题
Jan 11 面试题
Java基础类库面试题
Sep 04 面试题
如何执行一个shell程序
Nov 23 面试题
Delphi工程师笔试题
Sep 21 面试题
网上常见的一份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 socke 向指定页面提交数据
2008/07/23 PHP
发款php蜘蛛统计插件只要有mysql就可用
2010/10/12 PHP
php+ajax无刷新上传图片的实现方法
2016/12/06 PHP
PDO操作MySQL的基础教程(推荐)
2017/08/18 PHP
从新浪弄下来的全屏广告代码 与使用说明
2007/03/15 Javascript
用js来定义浏览器中一个左右浮动元素相对于页面主体宽度的位置的函数
2012/01/21 Javascript
JAVASCRIPT函数作用域和提前声明 分享
2013/08/22 Javascript
细说javascript函数从函数的构成开始
2013/08/29 Javascript
禁止iframe脚本弹出的窗口覆盖了父窗口的方法
2014/09/06 Javascript
node.js实现BigPipe详解
2014/12/05 Javascript
JavaScript获取表单内所有元素值的方法
2015/04/02 Javascript
jQuery插件Elastislide实现响应式的焦点图无缝滚动切换特效
2015/04/12 Javascript
jQuery关键词说明插件cluetip使用指南
2015/04/21 Javascript
非常实用的js验证框架实现源码 附原理方法
2016/06/08 Javascript
JavaScript控制输入框中只能输入中文、数字和英文的方法【基于正则实现】
2017/03/03 Javascript
js中setTimeout的妙用--防止循环超时
2017/03/06 Javascript
js注册时输入合法性验证方法
2017/10/21 Javascript
Spring Boot/VUE中路由传递参数的实现代码
2018/03/02 Javascript
Vue.js中关于侦听器(watch)的高级用法示例
2018/05/02 Javascript
vue-cli3单页构建大型项目方案
2020/04/07 Javascript
[01:03:56]Mineski vs TNC 2018国际邀请赛淘汰赛BO1 8.21
2018/08/22 DOTA
使用Python脚本在Linux下实现部分Bash Shell的教程
2015/04/17 Python
python实现按行切分文本文件的方法
2016/04/18 Python
Python Grid使用和布局详解
2018/06/30 Python
关于python字符串方法分类详解
2019/08/20 Python
python上传时包含boundary时的解决方法
2020/04/08 Python
介绍一下OSI七层模型
2012/07/03 面试题
《称象》教学反思
2014/04/25 职场文书
党委书记个人对照检查材料
2014/09/15 职场文书
2014年客房部工作总结
2014/11/22 职场文书
售票员岗位职责
2015/02/15 职场文书
公司出差管理制度范本
2015/08/05 职场文书
2016毕业实习单位评语大全
2015/12/01 职场文书
canvas绘制折线路径动画实现
2021/05/12 Javascript
详解CSS故障艺术
2021/05/25 HTML / CSS
zabbix自定义监控nginx状态实现过程
2021/11/01 Servers