你查看的存档文件来自 April, 2008.

有效使用linux的7个好习惯

Posted 4 months, 2 weeks ago at 1:09 am. 0 comments

不用使用root登录,原因:

  1. Well imagine you’re on the trapeze without a safety net,
    frightening isn’t it? Well that’s effectively what you are doing when
    you login as root, you can inadvertently hose your whole system
  2. You are at the risk of running malware. Any program that is started under root mode will automatically be given root privileges
  3. If there is a common security hole that hasn’t been patched yet, you could be totally “pwned”
  4. It’s common Unix convention, never run anything in root
    mode unless absolutely necessary. If a non-admin program asks for root
    access, you should be suspicious

尽量使用 su,sudo,gksu,kdesu

  • Use “sudo” or “su” , and kill the session when your done
  • If you don’t know how to do it in the command line, use “gksu” or “kdesu”. For example, press alt+f2 and type “gksu nautilus“. Close the app as soon as you finish

注意文件命名

  • As a rule of thumb, only use alphanumeric characters, hyphens, periods, and underscores
  • Avoid special symbols like dollar signs, brackets, and
    percentages. These symbols have special meanings to the shell, and
    could cause conflicts
  • Avoid using spaces, handling files with spaces in the
    terminal is kind of awkward. Replace spaces with either hyphens or
    underscores

把 /home 放在不同的分区

杀死崩溃进程

  1. I have the “force quit” applet on my taskbar, if any app
    starts to act up just click on the “force quit” icon and then kill the
    app
  2. If that doesn’t work, draw up a terminal and type “ps -A” , and take note of the Process ID (PID) of the culprit app, then kill it. “kill PID”
  3. Use the “killall” command, for example, “killall firefox-bin”
  4. If your whole GUI is frozen, and drawing up a terminal is
    impossible, then press CTRL-ALT-F1, this will take you to another
    terminal, and virtually a whole new session. From there kill the
    culprit app using step 2 and 3.
  5. If that doesn’t work, you might want to restart your GUI
    using the CTRL-ALT-Backspace combo. Beware, that this will kill all
    your GUI apps currently running
  6. Invoke CTRL-ALT-F1 and do CTRL+ALT+DEL from here. This
    will not instantly reset your system, merely perform a standard reboot,
    it’s safe. (Assuming you want to restart and CTLR-ALT-F1 works)
  7. Finally if nothing works, don’t rush to the hard reset button, try to Raise a Skinny Elephant

体验不同的发行版

via http://hehe2.net/linux-general/the-7-habits-of-highly-effective-linux-users/

Popularity: 17% [?]

No tag for this post.

linux shell 技巧

Posted 4 months, 3 weeks ago at 2:44 am. 0 comments

apropos ls

显示 ls 的相关信息

man -t ls | ps2pdf -> ls.pdf

输出 ls 手册为 postscript 然后转成 pdf

which ls

显示 ls 的完整路径

time ls 执行 ls 然后输出执行的时间

alias l=’ls -l’

定义 ls 别名,l 即可执行 ls -l 命令

cd -

回到刚才的目录

cd

进入 home 目录(等同于 cd ~)

cd 目录 && ls -l

进入“目录”,执行 ls -l 命令,然后返回当前目录

find -type f ! -perm -444

查找所有权限 444 以下的文件(不可读)

ls | pr -T9

9列显示

look fire

快速搜索字典中 fire 开头的单词

grep –color fire /usr/share/dict/words

在字典中高亮显示包含 fire 的单词

gpg -c file
gpg file.gpg

加(解)密文件

dd bs=1M if=/dev/sda | gzip | ssh user@remote ‘dd of=sda.gz’

备份硬盘数据到远程 ssh 主机

ssh -f -Y USER@HOSTNAME firefox

以 USER 身份登录 HOSTNAME 主机打开 GUI 程序(firefox)

wget -r -nd -np -l1 -A ‘*.jpg’ http://www.example.com/dir/

下载 http://www.example.com/dir/ 目录中的所有 jpg 图片(如果服务器允许目录浏览的话,否则返回 403 forbidden 错误)

wget –limit-rate=20k http://111.com

限制 wget 下载速度 20k/s

smbtree

寻找局域网中的 windows 主机

nmblookup -A 192.168.100.1

解析目标机器的 NetBIOS 名、组等

smbclient -L 192.168.100.97

查看 windows 主机的共享目录

mount -t smbfs -o fmask=666,guest //windows_box/share /mnt/share

挂接windows共享目录

Popularity: 24% [?]

Tags: ,

Ubuntu的5个技巧

Posted 5 months ago at 8:45 pm. 0 comments

安装 mp3,解码器和 java,flash插件

sudo apt-get install ubuntu-restricted-extras

安装 w32codecs

http://phorolinux.com/how-to-install-non-free-multimedia-codecs-on-ubuntu-710-gutsy-gibbon.html

安装 CompizConfig Settings Manager

sudo apt-get install compizconfig-settings-manager

安装 Opera 9.24

If you’re want to install Opera 9.24, you can use commercial repository for Ubuntu 7.10.

sudo gedit /etc/apt/sources.list

Add this line:

deb http://archive.canonical.com/ gutsy partner

After save file, run these commands:

sudo apt-get update
sudo apt-get install opera

ubuntu 系统清理

sudo apt-get autoclean
sudo apt-get clean

或者

sudo apt-get autoremove

Tags:

Popularity: 18% [?]

No tag for this post.

用 PlayOnLinux 玩 Windows 游戏

Posted 5 months ago at 8:16 pm. 0 comments

PlayOnLinux,Python编写的开源前端脚本,可以帮助你安装和玩上许多 Windows-only游戏。PlayOnLinux的核心就是Wine,但Wine是命令行程序,而PlayOnLinux则以图形化界面让你更易于 操作各种选项。PlayOnLinux还提供许多游戏脚本仓库,让游戏安装更轻松。

Tags:

Popularity: 20% [?]

No tag for this post.

开源的PHP论坛:SMF

Posted 5 months ago at 8:15 pm. 0 comments

SMF 为加拿大 Simple Machines Forum 的简称。简练,效率,强大,免费。 SMF 就是上面的集合体。
SMF 是下一代论坛和充满了前景的软件,同时又只消耗很少的服务器资源。当然,这都是免费的。基本特性为:全面的风格,超快数据库,安全的附件机制,自动化组件安装。

http://download.simplemachines.org/

Tags:

Popularity: 19% [?]

No tag for this post.

WinSCP - SSH协议文件传输软件

Posted 5 months ago at 8:13 pm. 0 comments

WinSCP 是一个支持SSH(Secure SHell)的SCP(Secure CoPy)文件传输软件.只要文件主机支持SSH协定,你就可以安心的下载、上传文件.它的操作界面是参考NC(Norton Commander)的双视窗排列方式,使用起来不会有太大的困难.在WinSCP中,一般的文件操作都没有问题,如:复制、移动、更名文件或文件夹等.

http://prdownloads.sourceforge.net/winscp/winscp410setup.exe

Tags:

Popularity: 18% [?]

No tag for this post.

PostgreSQL客户端 phpPgAdmin

Posted 5 months ago at 8:11 pm. 0 comments

ppa的4.2版本支持最新的PostgreSQL 8.3并且有一些如下的新功能:
- ENUM & UUID
- FTS,

http://phppgadmin.sourceforge.net/?page=download

Tags:

Popularity: 16% [?]

No tag for this post.

Savage 2 Linux 客户端

Posted 5 months ago at 6:27 pm. 0 comments

Savage 2: A Tortured Soul (《野人 2:受折磨的灵魂》) 这款游戏由 S2 Games 所开发,该游戏为《野人:纽维斯战役》的续作,组合了即时战略和第一人称射击两种游戏类型。日前,Savage 2 推出了 Linux 平台的客户端,支持 32 位和 64 位系统。现在,Linux 玩家也可加入 Savage 2,与其他平台的玩家一同参与游戏了。

http://phorolinux.com/how-to-install-savage-2-a-tortured-soul-on-linux.html

Popularity: 14% [?]

No tag for this post.

ad 468x60