免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3339 | 回复: 13
打印 上一主题 下一主题

发几道面试题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-07-09 12:33 |只看该作者 |倒序浏览
1. when you get this listing you see all the processes are named the seemingly benign "bash". How would you go about finding out what commands are REALLY being run?


2. You want to make a simple web-based application for organizing your recipes into categories. A recipe can be in multiple categories and a category can have multiple recipies. You expect to have about 12,000,000 recipes (for real!) and 300 categories. Please submit the create statements for any and all mysql tables you'd need for this project. (A recipe is just a single text field.)


3. Please submit a bash script to get a list of all users on a server with more than 100MB of mail. (Mail is kept in /home/username/Mail/ for each user.)


4. Please submit your FAVORITE joke!

论坛徽章:
0
2 [报告]
发表于 2010-07-09 12:52 |只看该作者
  1. 只恨英文水平太差
复制代码

论坛徽章:
0
3 [报告]
发表于 2010-07-09 12:55 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
16
IT运维版块每日发帖之星
日期:2015-08-24 06:20:00综合交流区版块每日发帖之星
日期:2015-10-14 06:20:00IT运维版块每日发帖之星
日期:2015-10-25 06:20:00IT运维版块每日发帖之星
日期:2015-11-06 06:20:00IT运维版块每日发帖之星
日期:2015-12-10 06:20:00平安夜徽章
日期:2015-12-26 00:06:302016猴年福章徽章
日期:2016-02-18 15:30:34IT运维版块每日发帖之星
日期:2016-04-15 06:20:00IT运维版块每日发帖之星
日期:2016-05-21 06:20:00综合交流区版块每日发帖之星
日期:2016-08-16 06:20:002015七夕节徽章
日期:2015-08-21 11:06:17IT运维版块每日发帖之星
日期:2015-08-14 06:20:00
4 [报告]
发表于 2010-07-09 14:11 |只看该作者
JB第三个压根不熟悉邮件服务器。我估计也就是find +awk简单的玩意而已。
前2个看不懂是什么意思。

论坛徽章:
15
2015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-15 17:29:44午马
日期:2015-01-06 17:06:51子鼠
日期:2014-11-24 10:11:13寅虎
日期:2014-08-18 07:10:55酉鸡
日期:2014-04-02 12:24:51双子座
日期:2014-04-02 12:19:44天秤座
日期:2014-03-17 11:43:36亥猪
日期:2014-03-13 08:13:51未羊
日期:2014-03-11 12:42:03白羊座
日期:2013-11-20 10:15:18CU大牛徽章
日期:2013-04-17 11:48:45
5 [报告]
发表于 2010-07-09 14:21 |只看该作者
本帖最后由 rdcwayx 于 2010-07-09 14:31 编辑

1. "ps -e " 的话,只能看到bash, 要用:  ps -ef 可以看到全命令,如果还要最全,要用:  /usr/ucb/ps -auwwwx

3. du -sk /home/*/Mail |awk '{if ($1>100000) {split($2,a, "/"); print a[3]}}'

4. 办公室里女白领要男同事讲一个既短小又有内涵的黄段子。

男士沉思片刻说了八个字:“我是锄禾,你是当午!”

论坛徽章:
16
IT运维版块每日发帖之星
日期:2015-08-24 06:20:00综合交流区版块每日发帖之星
日期:2015-10-14 06:20:00IT运维版块每日发帖之星
日期:2015-10-25 06:20:00IT运维版块每日发帖之星
日期:2015-11-06 06:20:00IT运维版块每日发帖之星
日期:2015-12-10 06:20:00平安夜徽章
日期:2015-12-26 00:06:302016猴年福章徽章
日期:2016-02-18 15:30:34IT运维版块每日发帖之星
日期:2016-04-15 06:20:00IT运维版块每日发帖之星
日期:2016-05-21 06:20:00综合交流区版块每日发帖之星
日期:2016-08-16 06:20:002015七夕节徽章
日期:2015-08-21 11:06:17IT运维版块每日发帖之星
日期:2015-08-14 06:20:00
6 [报告]
发表于 2010-07-09 14:26 |只看该作者
回复 5# rdcwayx


    awk '{$1>100000}' ???

awk '$1>100000'

论坛徽章:
0
7 [报告]
发表于 2010-07-09 14:35 |只看该作者
1,略

2,多对多关系设计

3,(for i in `awk -F':' '{print $1}' /etc/passwd`;do if [ -d "/home/$i/mail" ];then du -sch /home/$i/mail;fi;done) |grep -P "\d{3,}M|\d+G"
没算T级的

4,略

论坛徽章:
0
8 [报告]
发表于 2010-07-09 14:39 |只看该作者
回复 5# rdcwayx


    这个笑话好啊 , 如果面试官是个女的 ... ...  

论坛徽章:
16
IT运维版块每日发帖之星
日期:2015-08-24 06:20:00综合交流区版块每日发帖之星
日期:2015-10-14 06:20:00IT运维版块每日发帖之星
日期:2015-10-25 06:20:00IT运维版块每日发帖之星
日期:2015-11-06 06:20:00IT运维版块每日发帖之星
日期:2015-12-10 06:20:00平安夜徽章
日期:2015-12-26 00:06:302016猴年福章徽章
日期:2016-02-18 15:30:34IT运维版块每日发帖之星
日期:2016-04-15 06:20:00IT运维版块每日发帖之星
日期:2016-05-21 06:20:00综合交流区版块每日发帖之星
日期:2016-08-16 06:20:002015七夕节徽章
日期:2015-08-21 11:06:17IT运维版块每日发帖之星
日期:2015-08-14 06:20:00
9 [报告]
发表于 2010-07-09 14:46 |只看该作者

论坛徽章:
0
10 [报告]
发表于 2010-07-09 15:09 |只看该作者
第三个问题:请提供一个脚本列出服务器上所有的收到100MB以上邮件的用户。

俩方案都没测试!仅供参考。

for username in `ls -al /home`
do
if [[  `du -sh /home/$username/Mail|cut -f1` -gt 100M ]]
echo "$username Maildir is bigger than 5MB!";
fi
done

或者

find /home -type d -size +100m |awk -F"/"'/$1==home && $3=Mail/{print $2}'
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP