Comments on: bd – Quickly Go Back to a Parent Directory Instead of Typing “cd ../../..” Redundantly https://www.tecmint.com/bd-go-back-to-linux-directory/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Fri, 14 Jul 2023 00:33:57 +0000 hourly 1 By: bac0n https://www.tecmint.com/bd-go-back-to-linux-directory/comment-page-1/#comment-1017748 Sat, 21 Jul 2018 19:37:31 +0000 http://www.tecmint.com/?p=25131#comment-1017748 In reply to Spike.

# time cd ...
real    0m0,005s
user    0m0,001s
sys     0m0,005s
# cd /usr/local/bin/.../bin/.../bin (multiple expansion)
real    0m0,006s
user    0m0,002s
sys     0m0,004s
# time bd usr
real    0m0,012s
user    0m0,003s
sys     0m0,011s
]]>
By: Spike https://www.tecmint.com/bd-go-back-to-linux-directory/comment-page-1/#comment-1017224 Thu, 19 Jul 2018 12:44:53 +0000 http://www.tecmint.com/?p=25131#comment-1017224 In reply to Bac0n.

Ok, but instead of looping I just once call grep on the current path. I would think it’s more efficient than looping, but I’m not sure …

]]>
By: Bac0n https://www.tecmint.com/bd-go-back-to-linux-directory/comment-page-1/#comment-1016915 Wed, 18 Jul 2018 07:35:23 +0000 http://www.tecmint.com/?p=25131#comment-1016915 In reply to Spike.

I think our objective is very different, my function only intents to expand dots. The main challenge was to create it with one loop statement (I probably have to give that up), next was to only use builtins, external commands can be very resource demanding especially in a loop and adds unnecessary dependencies.

second version… (https://pastebin.com/gCquQjQk)

]]>
By: Aaron Kili https://www.tecmint.com/bd-go-back-to-linux-directory/comment-page-1/#comment-1011702 Thu, 05 Jul 2018 09:11:49 +0000 http://www.tecmint.com/?p=25131#comment-1011702 In reply to sandeep.

@sandeep

Thanks for the heads up, we will check and update the articles as soon as possible.

]]>
By: sandeep https://www.tecmint.com/bd-go-back-to-linux-directory/comment-page-1/#comment-1011286 Wed, 04 Jul 2018 20:00:19 +0000 http://www.tecmint.com/?p=25131#comment-1011286 Single quote missing in below command:

# echo 'alias bd=". bd -si" >> ~/.bashrc

]]>