-1
the correct command is cd Users/Gustavo
there is a space between cd and directory to access.
1
the correct command is cd Users/Gustavo
there is a space between cd and directory to access.
This is only the correct of $PWD
for /c
. In another directory it will not go to the desired location, which is the user folder Gustavo
on Windows system
0
git bash already starts by default in your user’s directory when it is in the default directory instead of showing all the way for example: /c/Users/Gustavo
it shows only one: ~
, when you are in another directory and want to go to the default directory you can type the following command: cd ~
, if you are in a directory and don’t know what content is in it you can also use the command ls
to list the files and folders in the directory you are currently in.
Only the command cd
has the same effect as the command cd ~
. By the way, the ~
is not something of the command cd
, but a specific expansion of bash
, to Tilde expansion, aimed at accessing files on home
yours or someone else’s. For example, if there is permission from Gustavo to read from the user Jeff the file teste.txt
, Gustavo could use it cat ~Jefferson/teste.txt
, that the bash
will expand that to cat /c/Users/Jefferson/teste.txt
and only then call the command cat
I know cd and ~ are two separate things, but I didn’t know that only cd would go home and ~ could access other clear home if you have permissions, thank you.
Thanks, you helped too much!
Browser other questions tagged directory command-line
You are not signed in. Login or sign up in order to post.
After
cd
have to have room:cd /Users
– hkotsubo
@hkotsubo, in the case of
git bash
, the root is a kind of artificial directory (unlike the standard Unix terminal) that contains, among other things, "directories" where partitions are mounted. Socd /c/
will put the terminal at the root of the directoryc
, alreadycd /Users
is not defined. You meancd /c/Users
– Jefferson Quesado
@Jeffersonquesado Perfect, I had forgotten this detail of
/c
. So there are 2 problems: the lack of space aftercd
and incorrect access to the root...– hkotsubo