Back to previous directory in shell cd,$OLDPWD
“cd -” works, it will call $OLDPWD i.e. pathname of the previous working directory.
If you found this post or this website helpful and would like to support our work, please consider making a donation. Thank you!
Help UsArticles in the same category
- Trouver rapidement et facilement l'adresse mac courante sous Linux
- How to Get or Extract filename and extension in bash
- How to check exit status of a command line in BASH ?
- Fast and easy way to get mac address on Linux
- Error "standard in must be a tty" when doing ssh username@server 'sudo command'
- Disable the usage of history using HISTSIZE,HISTFILE
- Désactiver l'historique en utilisant HISTSIZE,HISTFILE
- Comment vérifier le statut d'exécution d'une commande en BASH ?
- Comment extraire le nom et l'extension d'un fichier en Bash
- Back to previous directory in shell cd,$OLDPWD
- Linux Bash