date man page
coreutil detail docs
--date 参数使用的 Date Input String Docs
15 examples
date --date="-N days" +"%Y-%m-%d"
date man page
coreutil detail docs
--date 参数使用的 Date Input String Docs
15 examples
date --date="-N days" +"%Y-%m-%d"
#! /bin/sh | |
NAME=XXXXXXXXXX | |
DESC="XXXXXXXXXXXXXXXX" | |
PIDFILE="/var/run/${NAME}.pid" | |
LOGFILE="/var/log/${NAME}.log" | |
# path to the target executable file | |
DAEMON="/PATH/TO/EXECUTABLE/FILE" |
编辑当前用户的 home 路径下的 .bashrc 文件
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' this is default settings
PS1='${debian_chroot:+($debian_chroot)}\u : \W\$ ' this is set the prompt to user : currentDir$ ls
fi
/** | |
* 比较两个版本。 0 :两个版本相等; 1 : version1 > version2; -1 : version1 < version2 | |
* 仅适用于由数字和 "." 符号构成的版本号字符串。 对应正则规则 \d+(\.\d+)+ | |
* 如果 version1 和 version 2 均为 empty 返回0 , 否则 empty 恒小于任意字符串。 | |
*/ | |
private static int compareVersionString(String version1, String version2) { | |
if(StringUtils.isEmpty(version1)) { | |
if(StringUtils.isEmpty(version2)){ | |
return 0; | |
} else { |
ubuntu 下 chrome web app 启动器路径 | |
~/.local/share/applications/chrome-app-list.desktop | |
对应着安装在其中的 app 也在同一个路径下, | |
chrome-xxxxxxxx-Default.desktop |
#!/usr/bin/python | |
__author__ = 'jonny' | |
import re | |
import commands | |
import time | |
kbid_pattern = re.compile('(?<=id=)\d+', re.I) | |
masterid_pattern = re.compile('\d+(?=\)\])', re.I) |
default partial alphanumeric_keys modifier_keys | |
xkb_symbols "pc105" { | |
key <ESC> { [ Escape ] }; | |
// The extra key on many European keyboards: | |
key <LSGT> { [ less, greater, bar, brokenbar ] }; | |
// The following keys are common to all layouts. | |
key <BKSL> { [ backslash, bar ] }; |