Hey, what’s up?
一切尽在不言中!
Daily Archives: 17-Apr-2014
AIX cron jobs format
While you need to let server schedule something you can use built-in conn jobs to complete this requirement easily. Below just a sample cron jobs format explanation.
syntax:
minute hour day_of_month month weekday command
minute | 0 through 59 |
hour | 0 through 23 |
day_of_month | 1 through 31 |
month | 1 through 12 |
weekday | 0 through 6 for Sunday through Saturday |
command | a shell command |
sample:
30 * * * * do_every_half_an_hour.sh
* 1 * * * do_at_1am_daily.sh
* * 1 * * do_at_first_day_of_each_month.sh
* * * 1 * do_at_every_jan.sh
* * * * 0 do_at_every_sunday.sh
VI frequently used command
While using VI for many years, there are lots of materials in the man page or some other manual all talking about vi. But I did find some commands which are used quite often during my work with *NIX* like operation system (AIX, MAC, LINUX, CYGWIN, etc.).
- command mode and input mode switch $>ESC
- navigating right #>l
- navigation left #>h
- navigation up #>k
- navigation down #>j
- go to line end #>$
- go to 50th line #>50G
- go to first line #>1G
- go to last line $>GG
- go to line head #>0
- start a new line #>o
- delete current line #>dd
- copy current line inside vi #>yy
- paste line copied inside vi #>p
- delete current character #>x
- replace current character #>s
- insert at current position #>i
- page up #>CTRL b
- page down #>CTRL f
- append at end of current position #>a
- reload current file #>:edit
- close w/o save the file #>:q!
- save the file #>w
- save and close the file #>:wq
- to remove control m characters (type ctrl v ctrl m for ^M)#>:%s/^M//g
- …more coming soon