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

面试题 相关文章推荐
请写出 float x 与"零值"比较的 if 语句
Jan 04 面试题
写一个在SQL Server创建表的SQL语句
Mar 10 面试题
什么是Assembly(程序集)
Sep 14 面试题
如果一个类实现了多个接口但是这些接口有相同的方法名将会怎样
Jun 16 面试题
什么是View State?
Jan 27 面试题
RIP版本1跟版本2的区别
Dec 30 面试题
介绍一下MD5加密算法
Nov 12 面试题
C#和SQL Server的面试题
Aug 12 面试题
Linux如何修改文件和文件夹的权限
Jun 27 面试题
如何写一个自定义标签
Dec 28 面试题
信号量和自旋锁的区别?如何选择使用?
Sep 08 面试题
如何安装ruby on rails
Feb 09 面试题
网上常见的一份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
建立文件交换功能的脚本(二)
2006/10/09 PHP
ThinkPHP文件上传实例教程
2014/08/22 PHP
php ImageMagick windows下安装教程
2015/01/26 PHP
PHP实现HTTP断点续传的方法
2015/06/17 PHP
php正则表达式学习笔记
2015/11/13 PHP
thinkPHP实现多字段模糊匹配查询的方法
2016/12/01 PHP
[原创]站长必须要知道的javascript广告代码
2007/05/30 Javascript
button没写type=button会导致点击时提交
2014/03/06 Javascript
JS+CSS简单树形菜单实现方法
2015/09/12 Javascript
javascript简单比较日期大小的方法
2016/01/05 Javascript
使用jQuery判断浏览器滚动条位置的方法
2016/05/30 Javascript
JavaScript中windows.open()、windows.close()方法详解
2016/07/28 Javascript
JS中事件冒泡和事件捕获介绍
2016/12/13 Javascript
Bootstrap源码解读模态弹出框(11)
2016/12/28 Javascript
你真的了解BOM中的history对象吗
2017/02/13 Javascript
JS实现复制功能
2017/03/01 Javascript
性能优化之代码优化页面加载速度
2017/03/01 Javascript
JS加密插件CryptoJS实现的Base64加密示例
2020/08/16 Javascript
详解如何理解vue的key属性
2019/04/14 Javascript
linux环境下安装pyramid和新建项目的步骤
2013/11/27 Python
Python的Urllib库的基本使用教程
2015/04/30 Python
Django自定义分页效果
2017/06/27 Python
使用Pandas将inf, nan转化成特定的值
2019/12/19 Python
python3读取autocad图形文件.py实例
2020/06/05 Python
Tensorflow中批量读取数据的案列分析及TFRecord文件的打包与读取
2020/06/30 Python
OpenCV图片漫画效果的实现示例
2020/08/18 Python
html5 跨文档消息传输示例探讨
2013/04/01 HTML / CSS
使用HTML5加载音频和视频的实现代码
2020/11/30 HTML / CSS
美国眼镜网:GlassesUSA
2017/09/07 全球购物
PAUL HEWITT手表美国站:德国北部时尚生活配饰品牌,船锚元素
2017/11/18 全球购物
台湾SHOPRO购物行家:亚洲首创影视.3C.家电.优质购物平台
2018/05/07 全球购物
校园十大歌手策划书
2014/02/01 职场文书
个人担保书范文
2014/05/20 职场文书
运动会200米广播稿
2015/08/19 职场文书
在HTML5 localStorage中存储对象的示例代码
2021/04/21 Javascript
Golang连接并操作MySQL
2022/04/14 MySQL