Verifying the existence of a file in the terminal

39 views Asked by At

I am copying some code from GitHub, but when I try accessing a file within, the terminal outputs "No such file or directory".

I've tried looking for the files manually on the computer but indeed I cannot find them.

My guess is that the cloning is saving the codes somewhere else, and when I try to change to the directory it cannot access it since it does not exist in the computer.

Here is what I get to see in the terminal:

fun4all@Fun4AllSingularity:~$ git clone https://github.com/sPHENIX-Collaboration/macros.git
Cloning into 'macros'...
remote: Enumerating objects: 8930, done.
remote: Counting objects: 100% (422/422), done.
remote: Compressing objects: 100% (179/179), done.
remote: Total 8930 (delta 278), reused 348 (delta 241), pack-reused 8508
Receiving objects: 100% (8930/8930), 1.84 MiB | 1.72 MiB/s, done.
Resolving deltas: 100% (5193/5193), done.
fun4all@Fun4AllSingularity:~$ cd macros/macros/g4simulations/
bash: cd: macros/macros/g4simulations/: No such file or directory

I'm not sure if it is important, but I am using a virtual box, this is not on my local computer.

Also, it worked before, just recently it started giving this problem.

2

There are 2 answers

0
Mureinik On

The g4simulation directory no longer exists in this repository. It was removed back in January in commit 0c6692376c9920588290121ed0174ddeda102e22.

Presumably it is no longer needed since the title of the commit is:

ditch obsolete g4simulation directory

0
Jay On

Based on https://github.com/sPHENIX-Collaboration/macros this folder does not exist in the current master branch anymore.

As Mureinik pointed out, it was removed a while ago.

However, the folder still exists in the stale branch readback_check.

So if you still want to go to that directory - for whatever reason, you'll have to checkout that particular branch first.

cd macros
git checkout readback_check
cd macros/g4simulations/