18. curl 命令在命令行下如何检查你的未读邮件?这个命令对于工作在没有图形界面的服务器的人佷有用。它会在运行期间再次要求输入密码,你不需要在上面一行硬编码你的密码,否则会有其它安全风险。
linuxidc@localhost:~$ curl -u linuxidcshek1210@gmail.com --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print \t if //; print "$2\n" if /<(title|name)>(.*)<\/\1>/;'
输出样式
Enter host password for user 'linuxidcshek1210@gmail.com':
Gmail - Inbox for linuxidcshek1210@gmail.com
People offering cars in Delhi - Oct 26
Quikr Alerts
another dependency question
Chris Bannister
Ralf Mardorf
Reco
Brian
François Patte
Curt
Siard
berenger.morel
Hi linuxidcshek - Download your Free MBA Brochure Now...
Diya
★Top Best Sellers Of The Week, Take Your Pick★
Timesdeal
aptitude misconfigure?
Glenn English
Choosing Debian version or derivative to run Wine when resource poor
Chris Bannister
Zenaan Harkness
Curt
Tom H
Richard Owlett
Ralf Mardorf
Rob Owens
19.screen 命令screen命令能断开一个会话下的一个长时间运行的进程并能再次连接,如有需要,也提供了灵活的命令选项
要运行一个长时间的进程,我们通常执行
linuxidc@localhost:~$ ./long-unix-script.sh
缺乏灵活性,需要用户持续当前的会话,但是如果我们执行上面的命令是:
linuxidc@localhost:~$ screen ./long-unix-script.sh
它能在不同会话间断开或重连。当一个命令正在执行时按“Ctrl + A”然后再按“d”来断开。
重新连接运行:
linuxidc@localhost:~$ screen -r 4980.pts-0.localhost
注解:在这里,这个命令的稍后的部分是screen id,你能用‘screen -ls’命令查看。欲了解更多关于screen命令和它们的用法,请阅读我们的一些帮助文章:10 个screen命令的示例。
20. fileNo!写上面的命令不是笔误. ‘file’是一个能提供关于文件类型信息的命令。
linuxidc@localhost:~$ file 34.odt
34.odt: OpenDocument Text
21. id上面的命令会打印真正的和有效的用户和组的id。
linuxidc@localhost:~$ id
输出样式
uid=1000(linuxidc) gid=1000(linuxidc)
groups=1000(linuxidc),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(netdev),111(bluetooth),117(scanner)
到此为止,鉴于这个系列的最新的这篇文章的成功,我将会尽快推出另外几部分文章继续鲜为人知的Linux命令。到时候,敬请关注Tecmint.不要忘记给我们提供你的反馈和评论。
