WAIT HOLY SHIT I JUST FOUND OUT ABOUT cd -

comments (single view)

what does that do is it just cd ..

no, it’s like this:

lily : / % echo $OLDPWD

lily : / % cd ~
lily : ~ % echo $OLDPWD
/
lily : ~ % cd Desktop
/Users/Liliana Newton/Desktop
lily : ~/Desktop % echo $OLDPWD
/Users/Liliana Newton
lily : ~/Desktop % cd -
/Users/Liliana Newton
lily : ~ % echo $OLDPWD
/Users/Liliana Newton/Desktop
lily : ~ % cd -
/Users/Liliana Newton/Desktop
lily : ~/Desktop % echo $OLDPWD
/Users/Liliana Newton
lily : ~/Desktop %

no it just goes to the last used directory?

oh thats cool

So it's like using .. when linking files together in HTML?

that’s what @rivulet asked and i said no and explained what it did

View all comments