Concept

Cd (commande)

Résumé
The command, also known as (change directory), is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and s. The command has been implemented in operating systems such as Unix, DOS, IBM OS/2, MetaComCo TRIPOS, AmigaOS (where if a bare path is given, cd is implied), Microsoft Windows, ReactOS, and Linux. On MS-DOS, it is available in versions 2 and later. DR DOS 6.0 also includes an implementation of the and commands. The command is also available in the open source MS-DOS emulator DOSBox and in the EFI shell. It is named in HP MPE/iX. The command is analogous to the Stratus OpenVOS command. is frequently included built directly into a command-line interpreter. This is the case in most of the Unix shells (Bourne shell, tcsh, bash, etc.), cmd.exe on Microsoft Windows NT/2000+ and Windows PowerShell on Windows 7+ and COMMAND.COM on DOS/ Microsoft Windows 3.x-9x/ME. The system call that effects the command in most operating systems is that is defined by POSIX. Command line shells on Windows usually use the Windows API to change the current working directory, whereas on Unix systems calls the POSIX C function. This means that when the command is executed, no new process is created to migrate to the other directory as is the case with other commands such as ls. Instead, the shell itself executes this command. This is because, when a new process is created, child process inherits the directory in which the parent process was created. If the command inherits the parent process' directory, then the objective of the command cd will never be achieved. Windows PowerShell, Microsoft's object-oriented command line shell and scripting language, executes the command (cmdlet) within the shell's process. However, since PowerShell is based on the .NET Framework and has a different architecture than previous shells, all of PowerShell's cmdlets like , etc. run in the shell's process. Of course, this is not true for legacy commands which still run in a separate process.
À propos de ce résultat
Cette page est générée automatiquement et peut contenir des informations qui ne sont pas correctes, complètes, à jour ou pertinentes par rapport à votre recherche. Il en va de même pour toutes les autres pages de ce site. Veillez à vérifier les informations auprès des sources officielles de l'EPFL.