Hello friends how are you?????today i will share to all of you something really interesting about prompts in DOS and Unix and Linux....
Microsoft DOS users:-
To change the prompt in MS-DOS you must utilize the prompt command followed by special codes used in conjunction with the prompt command. Below are some commonly used prompts.
prompt $p$g
Changes the prompt to the standard used prompt in MS-DOS listing the drive with the current path, similar to what is seen below.
C:\>
C:\>
prompt $t $d$_$p$g
Change the prompt to list the time and date above the standard prompt, similar to what is seen below.
13:38:49.78 Mon 02/17/2003
C:\>
13:38:49.78 Mon 02/17/2003
C:\>
Unix and Linux users:-
Changing the prompt in Unix and Linux varies depending on what shell you are using.
If you are using the C Shell, type:
set prompt="`hostname`>"
Displays the hostname in the prompt, similar to the below prompt:
Computer>
Computer>
set prompt="`pwd`>"
Displays the working directory with the prompt:
/root>
/root>
set prompt="`hostname`(`pwd`)>"
Displays the hostname along with the working directory:
Computer(/root)>
Computer(/root)>
------------------------Thanking You Friends--------------------------------
No comments:
Post a Comment
Please Give Me Your Views