[kanchilug] 1D1C - cd

  • From: Dhanasekar <tkdhanasekar@xxxxxxxxx>
  • To: ilugc@xxxxxxxxxxxxx, kanchilug@xxxxxxxxxxxxx
  • Date: Tue, 10 May 2022 06:00:00 +0530

cd - change directory

example:
change current directory to /usr/share
$ cd /usr/share/

switch back to previous directory
$ cd -

To change current directory to parent directory
$ cd ..

To show last working directory from where we work
$ cd --

To move two directory up from where we now
$ cd ../ ../

move to users home directory from anywhere
$ cd ~

pushd saves the current location to memory and changes to the requested
directory
$ pushd /etc/perl/Net/
/etc/perl/Net ~
when popd command is entered, fetch the saved directory location from
memory and makes it current working directory
$ popd



regards,
T.Dhanasekar

Other related posts:

  • » [kanchilug] 1D1C - cd - Dhanasekar