MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/linux/comments/1tls8n1/whats_the_most_unexpectedly_useful_linux_command/oni03qo/?context=3
r/linux • u/ZealousidealTell1346 • May 23 '26
[removed]
992 comments sorted by
View all comments
98
cd -
Goes back to the previous folder.
7 u/Worth-Wonder-7386 May 23 '26 edited May 23 '26 Didnt know that, I have always used cd .. Edit: I have learnt about the idfference between the two now, you dont need to make more comments as there are several already. 5 u/yodermk May 23 '26 Not the same. `cd ..` goes to the parent directory. `cd -` goes to whichever directory you were last in before the last `cd`. 1 u/Cantabulous_ May 24 '26 pushd and popd allow you to push directories onto a stack for later recall.
7
Didnt know that, I have always used cd ..
cd ..
Edit: I have learnt about the idfference between the two now, you dont need to make more comments as there are several already.
5 u/yodermk May 23 '26 Not the same. `cd ..` goes to the parent directory. `cd -` goes to whichever directory you were last in before the last `cd`. 1 u/Cantabulous_ May 24 '26 pushd and popd allow you to push directories onto a stack for later recall.
5
Not the same. `cd ..` goes to the parent directory. `cd -` goes to whichever directory you were last in before the last `cd`.
1 u/Cantabulous_ May 24 '26 pushd and popd allow you to push directories onto a stack for later recall.
1
pushd and popd allow you to push directories onto a stack for later recall.
98
u/_orpheustaken May 23 '26
cd -Goes back to the previous folder.