Linux 101 hacks http://www.thegeekstuff.com/ 1. function mkdircd () { mkdir -p "$@" && eval cd "\"\$$#\""; } 2. # pushd . # popd 3. Use “shopt -s cdspell” to automatically correct mistyped directory names on cd 4. # date {mmddhhmiyyyy.ss} # date 013122192009.53 # date +%Y%m%d -s "20090131" # date -s "01/31/2009 22:19:53" # date -s "31 JAN 2009 22:19:53" # date set="31...
Linux 101 hacks http://www.thegeekstuff.com/ 1. function mkdircd () { mkdir -p "$@" && eval cd "\"\$$#\""; } 2. # pushd . # popd 3. Use “shopt -s cdspell” to automatically correct mistyped directory names on cd 4. # date {mmddhhmiyyyy.ss} # date 013122192009.53 # date +%Y%m%d -s "20090131" # date -s "01/31/2009 22:19:53" # date -s "31 JAN 2009 22:19:53" # date set="31...
刚发现个网址,个人觉得不错,给大家看看: :em03: :em03: http://www.dedoimedo.com/computers/linux-cool-hacks-more.html
Use CDPATH to define the base directory for cd commandIf you are frequently performing cd to subdirectories of a specific parent directory, you can set the CDPATH to the parent directory and perform cd to the subdirectories without giving the parent directory path as explained below. [ramesh@dev-db ~]# pwd /home/ramesh [ramesh@dev-db ~]# cd mail -bash: cd: mail: No such file or directory [Note:...