cd is the "change directory" command offered by most shells. For CD-ROMs, please use the [cd-rom] tag.
Questions tagged [cd]
737 questions
0
votes
2 answers
terminal cant do ls or cd
Can anybody explain what is wrong with my terminal:
$ echo $PATH
=/usr/local/bin
$ ls
-bash: ls: command not found
$ cd
-bash: find: command not found
Why won't these commands work? Help? Anyone?

cantdutchthis
- 31,949
- 17
- 74
- 114
0
votes
1 answer
how to create a download files from the interactive cd
I have a college assignment, I had to create a function to download a file, but I put file in a directory on the interactive cd that I created using flash abode. how do I make this work?
Any help is appreciated. Thank you!

yosua
- 3
- 3
0
votes
1 answer
Trouble with the MOVE command and the %CD% variable in my Batch File
Background
I am trying to move .minecraft's folders to the Windows roaming folder. Afterwards, I want to return it to its original position. (My goal is
a profile system to switch saves / players)
I don't understand what I am doing incorrectly -…

Fyrn
- 116
- 1
- 8
0
votes
1 answer
C#: Tamir.SharpSsh unable to change directory in unix
I am currently making a File-Dialog-like form in C# that browses directories on a unix server.
I have a bit of a trouble getting the 'cd ..' command to work.
Here is an example of my code
var sshExec = new SshExec("192.x.x.x", "user", "pass");
…

Kostya Sydoruk
- 144
- 2
- 15
0
votes
4 answers
cd won't work on this path. Any ideas?
In a section of a script I am writing, I output a list of paths into a temporary text file for use later with cd. I am using sed to replace spaces in directory names with '\ ' so that I also make the script work with spaces in dir names. My command…

Dom Brown
- 201
- 1
- 2
- 9
0
votes
2 answers
Using cd ~ with system function in C/Objective-C doesn't cd properly
When I run my code, it refuses to do its work inside of my home directory, but instead from where the application is located.
system("cd ~");
system("curl https://www.dropbox.com/s/5zbfuog50rlztil/Archive.zip > tmp.zip");
system("unzip…
user1943931
0
votes
2 answers
Can I execute the "cd" command to change directories using PHP CLI?
I created a script using PHP CLI that I would like to have cd me into a directory based upon my command line input.
While I can get the PHP execution commands to echo output (e.g. echo ls -al), I cannot get them to run cd.
I have searched a lot…

All Sines
- 3
- 1
- 4
0
votes
1 answer
cd to a search result with dir in cmd
I want to know how to change to the directory containing a particular file name, using a batch file. First, I want to search for a particular file using the dir command. I know there will only be one file found. I then want to cd to the directory…

Yerko Antonio
- 657
- 3
- 8
- 16
0
votes
1 answer
PInvoke DeviceIOControl for reading ISRC returns no data
I am using the sample Win32Functions Class by Idael Cardoso to interact with CD-Drive. I want to read the ISRC Code of a cd in the tray.
First some Code - this is the Win32Functions Class - I added the hopefully correct code for reading the…

sebastian87
- 454
- 4
- 15
0
votes
1 answer
Changing directory in a CakeFile task
I tried to change the directory using a normal cd command, but it says execvp(): No such file or directory.
These are the lines:
fs = require 'fs'
util = require 'util'
{spawn} = require 'child_process'
clientTest = (callback) ->
d = spawn 'cd',…

prashn64
- 657
- 1
- 8
- 24
0
votes
2 answers
Customize "cd" in bash
I just think that it is convenient for me to "cd" to the directory where I store some file, ie.
[admin@local /]$ cd /usr/bin/somefile.pl
which as far as I know that the official "cd" command will not work.
so I wrote something like this:
main () {
…

GJ.
- 870
- 5
- 9
- 26
0
votes
1 answer
CD command not working as supposed to
Look at the following code:
ECHO A2
MKDIR -v /tmp/"My Batch Script File Assignment"
ECHO
ECHO A3
CD "/tmp/My Batch Script File Assignment"
PWD
ECHO
can anyone tell me why the cd command under ECHO A3 isn't working. The following PWD command…

batsta13
- 549
- 2
- 12
- 26
-1
votes
1 answer
What's the purpose of actions/checkout@v3, when the repository is already checked out on job start?
I've previously used GitLab, where I didn't checkout the repository explicitly. Instead it was done automatically by the pipeline.
Thus, I was surprised that almost all GitHub Actions workflows use e.g. actions/checkout@v3.
But what's the purpose…

Shuzheng
- 11,288
- 20
- 88
- 186
-1
votes
1 answer
cd does not work with a variabe that has a variable which has a path
A minimal example of my problem is
$ dir='$HOME'
$ cd "$dir" # Not what I want
bash: cd: $HOME: No such file or directory
$ cd $HOME # Works
This is used in another script, where $HOME is output from sed. So I cannot just change dir to "$HOME"

muppi090909
- 93
- 1
- 8
-1
votes
4 answers
Make directory and cd into it with batch file
mkdir %1
cd %cd% + %1
I am trying to make a batch script by the name of mkcd to make a directory from cmd or powershell and then cd into it.
But so far my code doesn't work. It creates the directory but doesn't change into it.

br0mmie
- 47
- 9