Questions tagged [cd]

cd is the "change directory" command offered by most shells. For CD-ROMs, please use the [cd-rom] tag.

737 questions
-2
votes
1 answer

How to find folders in Linux?

I'm new to Linux and just downloaded WSL2 and ubuntu on my Windows PC. I started the Windows terminal, chose Ubuntu from there, and wanted to move to the Desktop by using cd. However, I could not find the Desktop folder. First, I did "ls /" and many…
Tom_Hanks
  • 517
  • 1
  • 6
  • 15
-2
votes
1 answer

How to open Clawpack directories?

We have to do simulate a tsunami for a school project using Geoclaw with Python, and I came across this tsunami example project on the Geoclaw official website: $CLAW/geoclaw/examples/tsunami/chile2010 . I thought it was a thing preinstalled with…
-2
votes
1 answer

Simple Git Bash .sh Script on windows to change directory does not work. Basic change directory in .sh script

Trying to make a script to automate activating a virtual environment for my django project. Here is my script which I save as 'activatevirt.sh'. The first couple lines work, but then when it gets to the lines to change directory it doesn't change…
-2
votes
1 answer

bash script cd command affecting tee command

I've a script to perform git operations. Parse the file for the repo, source and new branch Clone the repo check if the new branch already exists. skip this repo if it does create new branch: cd into the folder git branch new_branch git checkout…
RockyK
  • 3
  • 2
-2
votes
2 answers

Git Bash: My Desktop folder not found help me

$ cd /Desktop bash: cd: /Desktop: No such file or directory and start. command finally I have got the Desktop folder
Freizo
  • 1
  • 6
-2
votes
1 answer

CD strange behaviour

I need somebody to explain me what is happening in this sequence of "cd.." commands (note there is no space between "cd" and "..")…
Sebastia.Net
  • 129
  • 2
  • 14
-2
votes
1 answer

How to define a custom directory so that I can cd directory in Matlab

Suppose I have a directory cur = 'C:\Windows\debug'; Then I can run cd(cur) now. But I'm not used to using the function format. I hope I can use cd cur to change the current folder directly. Is this possible in MATLAB? Edit: Because I'm getting the…
yode
  • 483
  • 7
  • 16
-2
votes
1 answer

How to get the current user name on the computer running a batch file?

This is what I need: @echo off title H1Z1 Launcher By Grim0 cd C:\Users\%ComputerName%\AppData\LocalLow\Daybreak Game Company\Digests\H1Z1-KingKill That's the part that I tried but it didn't work. %ComputerName% in path should be the user name of…
Ido Shay
  • 3
  • 3
-2
votes
1 answer

What do I put instead of a space when changing directory?

C:\Users\First Last\ What do I replace the space with? I've tried multiple variations but nothing works. C:\Users\First-Last\ C:\Users\First_Last\ C:\Users\First`Last\
Xeccution
  • 1
  • 1
  • 1
-2
votes
3 answers

Why does "cd -" behave as it does?

What does cd - exactly do ? ( the change directory command, plus a dash ) I noticed that if I run it in my /home/user folder repeatedly it outputs either /home/user or /home, this changes if I run it from a different folder.
Alex
  • 550
  • 1
  • 7
  • 19
-2
votes
1 answer

cron scheduler how to cd to a location and execute a shell script

I am trying to run a shell script from Cron at reboot. The script is located in /var/gee. The script is named _startTest.sh. This is the command I have used in cron is: cd /var/gee && ./_startTest.sh The script doesn't run. Any ideas what I am…
Sascha
  • 398
  • 6
  • 14
-3
votes
2 answers

Segmentation fault when I change directory in C

I want to make a program that imitates the use of cd in UNIX. Obviously the best option is chdir. However when the user types cd /home I get Segmentation fault. When I use gdb, it prints: Program received signal SIGSEGV, Segmentation fault.…
Azzarian
  • 153
  • 2
  • 13
-3
votes
1 answer

How to imitate cd command in Java

Giving you two path, one is for the original path, and another is the parameter of the cd command. For Example: users/documents and stackOverFlow should return users/documents/stackOverFlow and users/documents and ../stackOverFlow should return…
Jie
  • 177
  • 4
  • 17
-3
votes
1 answer

Move directory in bash

I need to use "cd" on a shell script: move to the directory $home/folder/sub-folder and then check with a conditional statement if the directory's size is more than 2 MB. How could I accomplish this? Thanks in advance.
soulblazer
  • 1,178
  • 7
  • 20
  • 30
-4
votes
1 answer

How to change directories in Python?

I need to change the directory in the cmd with the command cd. For example cd users/desktop. But when I run the script, nothing happens. I have already tried with the following commands: os.chdir("cd Documents/archive") os.system("cd…
Jhonatan Zu
  • 169
  • 1
  • 3
  • 12
1 2 3
49
50