How to save a path in command prompt to recall it later.

How can I save a path to my favorites in command prompt to recall it later?

Questions by ferrarigf   answers by ferrarigf

Showing Answers 1 - 2 of 2 Answers

Assign the path to a variable except the environment variables. The variable will hold the value throughout the session. The scope is only to the shell it has been assigned at.

Steps:
              To set

                 $ <variable>=<path_to_be_specified>
              
              To recall it...

                 $ echo $<variable>

               Ex:  $ pathvar=`pwd`
                       $ echo $pathvar

  Was this answer useful?  Yes

we have an additional command in AIX to obtaine previously used path or command at the command line without assigning that path to a variable

run set -o vi  command at command prompt.

this will open a new shell with vi editor enabled.

then press esc button to ensure that u r in command mode.
then press k key on the keyboard and so on .
these will recall ur previous commands.


Also we can use history command at command line to view all previously used commands or paths or open sh_history file in ur home directory.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions