title | category | date | topics | metadata | ||
---|---|---|---|---|---|---|
Go to the previous directory |
Tip |
2021-10-17 15:16:00 +7 |
Command Line |
|
We probably know that the cd
command can be used to go to the given directory:
$ cd /path/to/directory
If you work with the terminal more often, then you might need to switch back and forth between different directories. If you see that typing the full path in the cd
command is not convenient, then you can replace the full path with -
.
The following command will bring you to the previous working directory:
$ cd -