DWQA QuestionsCategory: Server[Linux command] some directories are deep and need frequent switching. Is there any good way to simplify the operation?
joyeu asked 4 weeks ago

For example, you need to switch to the directory / root / project / oskit / examples / x86 frequently,
I’m tired of typing such a long directory or many CDs. I want to save this directory in the path file in the root directory,
Then a cat path | xargs CD
But why not? Wrong report!
Or do you have a simpler way?

9 Answers
Best Answer
felix021 answered 4 weeks ago

Add a line at ~ /. Bashrc:

alias x86='cd /root/project/oskit/examples/x86'

source ~/.bashrcLater (not next time)x86Just switch over.

annoupdate answered 4 weeks ago

ln -s
Need that trouble?

caichicong answered 4 weeks ago

Consider using the following script to manage in a bookmark like way

Leedy answered 4 weeks ago

Use Zsh, then usehash -d Node='/home/Leedy/Development/web/Node'
If you want to enter the node later, justcd Node

zhjie answered 4 weeks ago

To add another point, switch between two directories,cd -It is very convenient to switch between the two recent directories. In addition, do not use the default bash. Zsh is very powerful.