Tags » Unix

$# and S* in shell script

From here:

$#    Stores the number of command-line arguments that 
      were passed to the shell program.
$?    Stores the exit value of the last command that was 
      executed. 112 more words

The Heart of PowerShell

I watched Jeffrey Snover’s presentation recorded at a recent Dutch PowerShell User Group event, where he talked about some very important and fundamental concepts. I’ve placed the links at the end of my post and I encourage everyone to watch the whole presentation. 427 more words




sudo 意思就是super-user do,让当前用户暂时以管理员的身份root来执行这条命令。

su (switch user)是用来改变当前用户的,su root,就是将当前用户切换为root,用了su root之后,下面所有的命令就可以不用打sudo了,因为当前用户已经是管理员root了。

root 用户为根用户,也就是 系统管理员 拥有全部权限

一个用户只能拥有一个 GID ,但是还可以归属于其它附加群组



/etc/passwd 用户名 密码位 UID 归属GID 姓名 $HOME目录 登录Shell/etc/shadow 用户名 已加密密码 密码改动信息 密码策略/etc/group 群组名 密码位 GID 组内用户/etc/gshadow 群组密码相关文件,不重要/etc/sudoers 用户名 权限定义 权限可以使用 pwconv 命令创建影子密码,将 /etc/passwd 文件中的密码转换到 /etc/shadow 文件 214 more words


How to be a creative programmer

A Rap on Kevin Kelly’s Nine laws of God

  • Control freaks in management tend to say: “help ! everythings happening all at once!” as if some totalitarian rule of linear ordering has been broken.
  • 846 more words
Geek Teachings

Каждый хочет максимально персонализировать своё рабочее место, кто выбирает отличные от стандартных темы оформления, кто заставки меняет, а мы будет менять консольные цвета по умолчанию. Данный пример был опробован на RedHat Enterprise Linux 6… 25 more words



set lines 1000
set pages 1000
col stat_name format a21
col value format 99999
col comments format a60
select stat_name,value,comments from v$osstat
where stat_name in (
union all
select stat_name,value/1024/1024/1024 "PHY MEM(GB)" ,comments from v$osstat
where stat_name in (

HPUX: How to send mail with attachment?

Below is the command I used in my script to send email with attachment form HPUX, I have modified the command to be self explainatory. 11 more words