e*******s 发帖数: 1363 | 1 two commands may be helpful:
pushd: Stores the current directory for use by the POPD command,
then changes to the specified directory.
popd: Changes to the directory stored by the PUSHD command.
could |
|
Z****e 发帖数: 2999 | 2 or pushd/popd for multiple level |
|
J********a 发帖数: 5208 | 3 一般要回退都是嫌麻烦,老pushd popd更麻烦,我老从来不用 |
|
b*****l 发帖数: 9499 | 4 其实把 cd 和 pushd popd 自动挂起来好像就可以了吧。。。 最好还能设快捷路径临时
记忆几个路径。。。 |
|
|
|
|
|
r****t 发帖数: 10904 | 9 hand. I alias cd to pushd already.
Also use "cd -" etc... |
|
l*******G 发帖数: 1191 | 10 Try all in one line:
find . -name Makefile |xargs -I {} dirname {} |xargs -I {} bash -c "pushd .
; cd {}; make clean ; rm -f .*.swp; popd" |
|
e*******o 发帖数: 4654 | 11 来自主题: Programming版 - 日记软件 diary () {
vim ~/notebooks/logbook/$(date '+%Y-%m-%d').md
pushd . && cd ~/notebooks && fossil commit -m 'update' && popd
}
vim 打开文件,保持,同步。 |
|