dir /a-D /S /B your_dir(orLeaveEmpty)
find your_dir -print -ls
journalctl -fu process_name
-fu follows the stdout.
| # Add ./.. of the file to python path | |
| sys.path.insert(0, os.path.normpath(os.path.join(os.path.realpath(__file__), '..', '..'))) | |
| # Current path | |
| base = os.path.dirname(os.path.realpath(__file__)) | |
| # File abs path | |
| cos.path.realpath(__file__) |
abc... Letters 123... Digits
| # add one level above to path. | |
| sys.path.insert(0, os.path.normpath(os.path.join(os.path.realpath(__file__), | |
| '..', '..'))) | |
| # ------------------------------------- | |
| import shutil, os | |
| shutil.rmtree(path, ignore_errors=True) # rm folder | |
| os.makedirs(path, exist_ok=True) # mkdir |
| pandoc --pdf-engine=xelatex --toc -N -o dest.pdf target.md |
| # Activate config | |
| tmux source-file ~/.tmux.conf | |
| # Useful plugins for vim and tmux consistency | |
| Plugin 'christoomey/vim-tmux-navigator' --> in vimrc | |
| # -----------The following is for .tmux.conf -------------------------------------# | |
| # Smart pane switching with awareness of Vim splits. | |
| # See: https://github.com/christoomey/vim-tmux-navigator |
| docker-compose.yml | |
| services: | |
| jenkins: | |
| container_name: jenkins | |
| image: jenkins/jenkins | |
| ports: | |
| - "8080:8080" | |
| volumes: | |
| - "$PWD/jenkins_home:/var/jenkins_home" |
| # Open a container | |
| docker exec -it NAME bash | |
| # Exit | |
| exit | |
| # Copy file to container | |
| docker cp script.sh jenkins:/tmp/script.sh |
| Movement: | |
| 0 -- 到行头 | |
| $ -- 到行尾 | |
| fx -- 下一个x | |
| ; -- 重复 f t F T | |
| ^ b -- 倒一页 | |
| ^ f -- 进一页 | |
| zt or z<CR> -- Move current line top of the screen | |
| z. or zz -- Move cl center of screen |