diff --git a/pages/osx/popd.md b/pages/common/popd.md similarity index 78% rename from pages/osx/popd.md rename to pages/common/popd.md index fab4246dc2..ed488b32dd 100644 --- a/pages/osx/popd.md +++ b/pages/common/popd.md @@ -1,6 +1,7 @@ # popd > Remove a directory placed on the directory stack via the pushd shell built-in. +> See also `pushd` to place a directory on the stack and `dirs` to display directory stack contents. - Remove the top directory from the stack and cd to it: diff --git a/pages/osx/pushd.md b/pages/common/pushd.md similarity index 73% rename from pages/osx/pushd.md rename to pages/common/pushd.md index 21d608f844..54d9b94479 100644 --- a/pages/osx/pushd.md +++ b/pages/common/pushd.md @@ -1,7 +1,7 @@ # pushd > Place a directory on a stack so it can be accessed later. -> See also `popd` to switch back to original directory. +> See also `popd` to switch back to original directory and `dirs` to display directory stack contents. - Switch to directory and push it on the stack: diff --git a/pages/linux/popd.md b/pages/linux/popd.md deleted file mode 100644 index 34576cbe7c..0000000000 --- a/pages/linux/popd.md +++ /dev/null @@ -1,15 +0,0 @@ -# popd - -> Remove a directory placed on the directory stack by the `pushd` command. - -- Remove the top directory from the stack and cd to it: - -`popd` - -- Remove the Nth directory (starting from zero to the left from the list printed with `dirs`): - -`popd +N` - -- Remove the Nth directory (starting from zero to the right from the list printed with `dirs`): - -`popd -N` diff --git a/pages/linux/pushd.md b/pages/linux/pushd.md deleted file mode 100644 index 56095473e6..0000000000 --- a/pages/linux/pushd.md +++ /dev/null @@ -1,16 +0,0 @@ -# pushd - -> Place a directory on a stack so it can be accessed later. -> See also `popd` to switch back to original directory. - -- Switch to directory and push it on the stack: - -`pushd < {{directory}}` - -- Switch first and second directories on the stack: - -`pushd` - -- Rotate stack by making the 5th element the top of the stack: - -`pushd +4`