Change directory helper function
This function might be the most useful one in my own scripts, and I had introduced it for several times.
Let’s say you are working in a big project such as Android Framework, or your are a command-line heavy user. The change-directory-command, cd
, would be typed thounsands times per day. THAT IS SO ANNOYING!.
Try adding this function to ~/.bashrc
1 | ..() { |
suppose you are in /home/foo/L1/L2/L3/L4
1 | $ .. # will go to L3 |