answersLogoWhite

0

Some versions of pwd are internal to the shell, and thus do not need to be executed as a separate process. The command executes so fast you are unlikely to see it on a list of processes, anyway.

Here is a very crude test to show that pwd. when a separate binary, does in fact create a new process. It consists of two scripts with an infinite loop, one constantly running pwd, the other running PS -A and grepping for the word pwd. You will need to console displays or two terminals to test this. Slowly but surely, the script checking for pwd will spit out instances of pwd being run or exiting (defunct).

#/bin/sh

#This script constantly runs pwd. Kill with Ctrl - C

COUNTER=1

while [ $COUNTER -lt 2 ]; do

/bin/pwd

done

#/bin/sh

#This script constantly runs PS -A|grep pwd. Kill with Ctrl - C

COUNTER=1

while [ $COUNTER -lt 2 ]; do

PS -A | grep pwd

done

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What Linux command with tell you the location and path to a command?

pwd


How do you identify the working directory in Linux?

The command 'pwd' will identify the full path of the present working directory.


What command will return you to your home directory regardless of where you are in the file system?

PWD Although pwd will tell you where you are it won't change back to your home directory. For that, use the 'cd' command without any parameters


Linux command returns the absolute path of the current directory?

pwd


What is the Linux command for displaying a working directory?

The command pwd displays your current/present working directory.


Which command would a user type on the command line to find out what directory in the directory tree he is currently in?

PWD


Which Linux command shows which shell you are in?

to get the current shell :echo $0also Use the command ps with -p {pid} option, which selects the processes whose process ID numbers appear in pid. Use following command to find out what shell you are in:ps -p $$


Which command is used to create a sub processes?

For Unix, any command is run as a sub-process. You don't need an actual command to create the subprocess. You can also force the process to run in the background by appending a '&' symbol at the end of the command.


How do you bring up windows command prompt in xp if you have limited admin rights and cant normally get it?

How do i go to command prompt without booting the windows. I pressed F8 and selected safe mode with command prompt. The reason i am trying is I forgot my windows pwd and i found one option to change the pwd through command prompt


What is the pwd command in Linux?

The pwd command prints the working directory. The working directory is the directory you are "in", where operations on files that don't have an absolute path specified will be performed. For instance, if my working directory is /home/username/stuff, then the command echo "test" > test.txt would place the file test.txt in that directory.


Define the term pwd in unix?

The Command "pwd" stands for 'Print Working Directory' and returns to the user, on the screen, the present working directory. In the example below, the user types "pwd" and presses the enter key to be shown on the next line, the name of the directory that the user is currently under (etc): $ pwd /etc


How do you find absolute path name of your home directory what is it on your system?

All you need is the PWD(Print Working Directory) command, this will list your current directory absolute path All you need is the PWD(Print Working Directory) command, this will list your current directory absolute path