jfo planet

Hope is the best gift that tomorrow gives.

  • 首页
  • 分类
  • 归档
  • 标签
  • 搜索
close

【zz】History(历史)命令用法 15 例

发表于 2008-10-05   |   分类于 Linux App
http://linuxtoy.org/archives/history-command-usage-examples.htmlHistory(历史)命令用法 15 例从 LinuxTOY 作者:Toy如果你经常使用 Linux 命令行,那么使用 history(历史)命令可以有效地提升你的效率。本文将通过实例的方式向你介绍 history 命令的 15 个用法。 使用 HISTTIMEFORMAT 显示时间戳 当你从命令行执行 history 命令后,通常只会显示已执行命令的序号和命令本身。如果你想要查看命令历史的时间戳,那么可以执行: # export HISTTIMEFORMAT=’%F %T ‘ # history | more 1 2008-08-05 19:02:39 service network restart 2 2008-08-05 19:02:39 exit 3 2008-08-05 19:02:39 id 4 2008-08-05 19:02:39 cat /etc/redhat-release 注意:这个功能只 ...
阅读全文 »

【zz】Ubuntu 中的Load/Unload Cycle Count问题及解决方案

发表于 2008-10-04   |   分类于 Linux App
http://afita.spaces.live.com/blog/cns!D26666E8B226D1A6!1501.entryhttp://linuxtoy.org/archives/ubuntu-harddisk.htmlUbuntu 中的Load/Unload Cycle Count问题及解决方案 说明:本文所描述的问题只在笔记本硬盘中才会出现。1. 问题描述 几周前收到soldiers童鞋的短信说,Ubuntu伤硬盘?我说没事,好多人都用呢。过了一周,soldiers童鞋又问,Ubuntu伤硬盘?我说我查查看….# 安装smart参数查看工具,由此可以查看硬盘的smart信息$ sudo apt-get install smartmontools # 查看/dev/sda这块硬盘的smart参数, 你可能需要把/dev/sda这部分修改成你的硬盘设备地址# grep 193是只查看 Load Cycle Count这项 $ sudo smartctl -a /dev/sda | grep 193193 Load_Cycle_Count   &n ...
阅读全文 »

Linux socket programming - PF_NETLINK

发表于 2008-10-04   |   分类于 Network
PF_NETLINK        Kernel user interface device        man 7 netlink                                                         &nbs ...
阅读全文 »

Linux socket programming - PF_UNIX/PF_LOCAL

发表于 2008-10-04   |   分类于 Network
PF_UNIX, PF_LOCAL    Local communication        man 7 unix                                                                    &nbs ...
阅读全文 »

File Locks

发表于 2008-10-04   |   分类于 Linux
http://www.gnu.org/software/libtool/manual/libc/File-Locks.htmlFile LocksThe remaining fcntl commands are used to support record locking, which permits multiple cooperating programs to prevent each other from simultaneously accessing parts of a file in error-prone ways.An exclusive or write lock gives a process exclusive access for writing to the specified part of the file. While a write lock is in place, no other process can lock that part of the file.A shared or read lock prohibits any other ...
阅读全文 »

【zz】工作量大不過勞的六個方法

发表于 2008-10-03   |   分类于 Life
【工作量大不過勞的六個方法】 《威力午睡》越 來越多醫學報告證實,工作日下午抽空睡20-30分鐘,有助於提升工作效率、降低錯誤以及減少人際衝突。這種短而有效的充電方法。 《學習新嗜好》抽 空報名學習一種新語言、球類運動或是樂器,給你不隨意加班的正當理由,又可以認識新朋友,靈活你的大腦與創意,提供更多與客戶聊天的話題。你將發現同樣的錢拿去繳學費, 比買名牌衣 服的投資報 酬率高出許多。 《不把電腦帶回家》下 班後不只是你的筆記型電腦,最好連PDA、黑苺機全部都留在公司。這樣做會強迫自己工作時更有效率,下班時心情更輕鬆,更可省下家裡的電費。 《工作與家庭清單》許 多人或許已經養成隨時寫下需要完成的工作清單,但是卻很少人寫下為家人的需求清單。記住!工作的主要目的之一不就是讓家人幸福嗎? 《長假不如短休》上 班族與其引頸期盼一年一度的出國旅遊, 不如妥善安排每天上班時的短休。在桌上放個計時器或網路下載提醒軟體,每隔50分鐘就讓自己從位置上起身,不管是喝口水、伸展筋骨、深呼吸、上洗手間,都能讓你疲勞的肌肉以及腦袋得到適時的休息。 《勤練放鬆技巧》讓 自己表情輕鬆,腦袋清楚。 許多 ...
阅读全文 »

Set-User-ID Permission for Executable Files

发表于 2008-10-01   |   分类于 Linux App
http://en.wikipedia.org/wiki/Setuidsetuid on executablesWhen a binary executable file has been given the setuid attribute, normal users on the system can execute this file and gain the privileges of the user who owns the file (commonly root) within the created process. When root privileges have been gained within the process, the application can then perform tasks on the system that regular users normally would be restricted from doing. The invoking user will be prohibited by the system from al ...
阅读全文 »

【zz】ubuntu下intel 3945abg无线网卡驱动——使用ipw3945替换iwl3945

发表于 2008-09-29   |   分类于 Linux App
http://www.blogjava.net/daning/archive/2008/07/09/213615.htmlps:根据碰到的问题做了一些小修正症状具体症状如下:1. 可以识别无线网络,可以链接到无线网络。2. 刚连接上之后一段时间,速度还不错。3. 过一段时间,网络就变的很慢很慢,有时候是没有速度,有时候会断线。4. 期间偶尔会变好。总体来说,就是无线网卡不稳定。于是很无奈的,我的笔记本只能天天插着网线上网了。解决方案最近终于不能忍了,在网上搜索了一下解决方案。是因为ubuntu 8.04使用intel新开发的驱动iwlwifi(驱动名称是iwl3945)作为intel无线网卡的驱动,而这个iwlwifi还很不稳定。所以,基本思想是使用原来的很稳定的ipw3945驱动替换现在的iwl3945驱动。ipw3945现在已经停止开发了,最新版本是1.2.2,但是1.2.2在linux内核2.6.24或者更高版本中不能正常安装。幸好[3]中提供了一个可用的补丁,才可以解决问题。[3]中还强烈谴责了这种新版本驱动还没有开发稳定就停止对于旧驱动的开发的行为,认为这是对用户极大的不负 ...
阅读全文 »

Linux command (cont.)

发表于 2008-09-28   |   分类于 Linux App
Linux Command(cont.)Part 1 Linux Command 退出shell,但不退出该shell启动的后台程序:nohup ./sh & ==============================================================pdftk把文件 1.pdf、2.pdf 和 3.pdf 合并成一个名为 123.pdf 的新文件,参数的有效格式只能是单个的大写字母,比如 A、B、C 等。pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdfpdftk A=1.pdf B=2.pdf C=3.pdf cat A B C output 123.pdf pdftk *.pdf cat output combined.pdf 将文件 one.pdf 中的 1~7 页、two.pdf 中 1~5 页和 one.pdf 中的第 8 页分割出来, 依次合并为一个名为 combined.pdf 的新文件。pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output comb ...
阅读全文 »

Linux-PAM

发表于 2008-09-28   |   分类于 Linux App
mypam_namespace.so模块应用,polyinstantiation(多实例化),提高安全性 通过配置pam,在用户登录时实际登录的是虚拟目录,类似chroot,用户的所有操作都限定在该虚拟目录中。修改/etc/security/namespace.conf,添加:$HOME    $HOME/$USER.inst/inst-    context# mkdir /home/test/test.inst# chown root:root /home/test/test.inst# chmod 000 /home/test/test.inst在/etc/pam.d/login 和 /etc/pam.d/sshd 中添加:session required pam_namespace.soCtrl+Alt+F1,以test用户登录$ touch test_file$ lstest_file$ pwd/home/test再以root用户来看:root@jfo-laptop:/home/test# cd test. ...
阅读全文 »
1…343536…61
jfo

jfo

605 日志
38 分类
4 标签
RSS
GitHub 微博
友情链接
  • 收藏夹
  • 网络剪贴板
  • 爱逛吧
© 2007 - 2018 jfo
由 Hexo 强力驱动
主题 - NexT.Pisces